473,326 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

verify whether "str" is still callable in Python 2.5.1

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

Aug 13 '07 #1
3 1567
Ge Chunyuan wrote:
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.
>>callable(str)
True
>>str = "yadda"
callable(str)
False

Peter
Aug 13 '07 #2
On Aug 13, 4:48 pm, Peter Otten <__pete...@web.dewrote:
Ge Chunyuan wrote:
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.
>callable(str)
True
>str = "yadda"
callable(str)

False

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

Aug 13 '07 #3
Ge Chunyuan <hh****@gmail.comwrote:
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]: ''
--
Lawrence, oluyede.org - neropercaso.it
"It is difficult to get a man to understand
something when his salary depends on not
understanding it" - Upton Sinclair
Aug 13 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Tuxtrax | last post by:
Hi all. I have need of assistance on something that should be very simple, and is driving me absolutely batty. This is a code snippet from a short program that downloads news headers via...
1
by: ScottyO | last post by:
Hello, I have some legacy C++ code that was re-written as a managed class. I made a C++ class library with it and I want to use it in my C# program. I created a reference to it and it...
2
by: john | last post by:
In a query I have this expression: Expr1: "ZH"+Str() It should give me ZH1234 but it adds a space between the 2 parts so I get ZH 1234. What can I do to prevent this? Thanks, john
8
by: John Nagle | last post by:
Here's a wierd problem: I have a little test case for M2Crypto, which just opens up SSL connections to web servers and reads their certificates. This works fine. But if I execute ...
8
by: John Nagle | last post by:
The Python documentation for "str" says "str() : Return a string containing a nicely printable representation of an object." However, there's no mention of the fact that "str" of a Unicode...
206
by: WaterWalk | last post by:
I've just read an article "Building Robust System" by Gerald Jay Sussman. The article is here: http://swiss.csail.mit.edu/classes/symbolic/spring07/readings/robust-systems.pdf In it there is a...
1
by: bcwhite | last post by:
I'm writing a program and want to create a class that is derived from the "str" base type. When I do so, however, I have problems with the __init__ method. When I run the code below, it will call...
11
by: Erich | last post by:
Hello all, Today I found myself once again defining two functions that I use all the time: nsplit and iterable. These little helper functions of mine get used all the time when I work. Im sick...
7
by: satoru | last post by:
hi, all i want to check if a variable is iterable like a list, how can i implement this?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.