A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-bugs-list/2001-December/008927.html below:

[Python-bugs-list] [ python-Bugs-491301 ] a bad tuple comparison

[Python-bugs-list] [ python-Bugs-491301 ] a bad tuple comparison [Python-bugs-list] [ python-Bugs-491301 ] a bad tuple comparisonnoreply@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



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4