[ python-Bugs-1521726 ] isinstance failure in 2.6 Beta 2

SourceForge.net noreply at sourceforge.net
Thu Jul 13 12:56:23 CEST 2006


Bugs item #1521726, was opened at 2006-07-13 10:56
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1521726&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: Python Library
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Submitted By: Nick Maclaren (nmm)
Assigned to: Nobody/Anonymous (nobody)
Summary: isinstance failure in 2.6 Beta 2

Initial Comment:
Linux gosset 2.6.16.13-4-smp #1 SMP Wed May 3 04:53:23
UTC 2006 x86_64 x86_64 x86_64 GNU/Linux
./python Lib/test/test_compile.py

  File "Lib/test/test_compile.py", line 6, in <module>
    class TestSpecifics(unittest.TestCase):
  File "Lib/test/test_compile.py", line 399, in test_main
    test_support.run_unittest(TestSpecifics)
  File
"/home/nmm/Python-2.5b2/Lib/test/test_support.py", line
422, in run_unittest
    run_suite(suite, testclass)
  File
"/home/nmm/Python-2.5b2/Lib/test/test_support.py", line
407, in run_suite    raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent
call last):
  File "Lib/test/test_compile.py", line 226, in
test_unary_minus
    self.assertTrue(isinstance(eval("%s" % (-sys.maxint
- 1)), int))

./python
Python 2.5b2 (r25b2:50512, Jul 13 2006, 11:33:15)
>>> import sys
>>> print sys.maxint
9223372036854775807
>>> print "%s" % (-sys.maxint - 1)
-9223372036854775808
>>> print isinstance(eval("%s" % (-sys.maxint - 1)), int)
False
>>> print isinstance(eval("%s" % (-sys.maxint)), int)
True


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1521726&group_id=5470


More information about the Python-bugs-list mailing list