verify whether "str" is still callable in Python 2.5.1

G

Ge Chunyuan

hi Group:

Once use ActivePython latest version for Python 2.5.1.
I happened to find function "str" is not callable, but it is available
for Python 2.5.
Can anybody give some comments about it?
Any response is highly appreciated.



Thanks
Ge Chunyuan
 
P

Peter Otten

Ge said:
Once use ActivePython latest version for Python 2.5.1.
I happened to find function "str" is not callable, but it is available
for Python 2.5.

If it's not callable it's not the str() function, but something else with a
badly chosen variable name.
False

Peter
 
G

Ge Chunyuan

If it's not callable it's not the str() function, but something else with a
badly chosen variable name.


False

Peter

oh, please forget my silly question.
you are absolutely right.
 
L

Lawrence Oluyede

Ge Chunyuan said:
Once use ActivePython latest version for Python 2.5.1.
I happened to find function "str" is not callable, but it is available
for Python 2.5.
Can anybody give some comments about it?

I don't really understand what your asking. str is a callable, it has
always been AFAIK, since it's a type constructor, like int()

In [1]: callable(str)
Out[1]: True

In [2]: str()
Out[2]: ''
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top