[Python-bugs-list] [ python-Bugs-491301 ] a bad tuple comparison
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 10 Dec 2001 12:48:16 -0800
Bugs item #491301, was opened at 2001-12-10 12:48
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=491301&group_id=5470
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Daniel Ortmann (dortmann)
Assigned to: Nobody/Anonymous (nobody)
Summary: a bad tuple comparison
Initial Comment:
A slice of sys.version_info does not compare as a tuple.
#!/usr/local/bin/python
import sys
a = (2,2)
b = (sys.version_info[0:1])
c = (sys.version_info[0], sys.version_info[1])
assert a == b, "kaBOOM! assertion failed: a == b"
assert a == c, "kaBOOM! assertion failed: a == c"
print "everything is okey dokey! :-)"
Comment out the first assert and everything works fine.
(I am new to python, but this seems to be an error; it
was, at the very least, unexpected and counter intuitive.)
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=491301&group_id=5470