[ python-Bugs-1541566 ] bug in python 2.4.3 for windows?
SourceForge.net
noreply at sourceforge.net
Wed Aug 16 23:07:28 CEST 2006
Bugs item #1541566, was opened at 2006-08-16 20:59
Message generated for change (Comment added) made by gbrandl
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1541566&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Windows
Group: Python 2.4
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: tinkiwinky (tinkiwinky)
Assigned to: Nobody/Anonymous (nobody)
Summary: bug in python 2.4.3 for windows?
Initial Comment:
y = ["halo:lol","ich:bin","wir:wareum","galopp:kufladen"]
for i in y:
z = i.split(":")[0]
if z is "wir":
print z, "is wir"
else: print z, "is not wir"
the output from this include: "wir is not wir"
I am using python 2.4.3 on windows xp sp2 german
----------------------------------------------------------------------
>Comment By: Georg Brandl (gbrandl)
Date: 2006-08-16 21:07
Message:
Logged In: YES
user_id=849994
Don't use "is" for string comparison. It compares object
identity, and while this may work in some cases, it does not
in most. Use "==" instead.
Closing as Invalid.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1541566&group_id=5470
More information about the Python-bugs-list
mailing list