This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: bug in python 2.4.3 for windows?
Type: Stage:
Components: Windows Versions: Python 2.4
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, tinkiwinky
Priority: normal Keywords:

Created on 2006-08-16 20:59 by tinkiwinky, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg29524 - (view) Author: tinkiwinky (tinkiwinky) Date: 2006-08-16 20:59
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
msg29525 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-08-16 21:07
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.
History
Date User Action Args
2022-04-11 14:56:19adminsetgithub: 43837
2006-08-16 20:59:15tinkiwinkycreate