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: isinstance failure in 2.5 Beta 2
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: nmm, nnorwitz
Priority: normal Keywords:

Created on 2006-07-13 10:56 by nmm, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg29156 - (view) Author: Nick Maclaren (nmm) Date: 2006-07-13 10:56
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
msg29157 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-07-17 01:13
Logged In: YES 
user_id=33168

What version of gcc?  Is this a duplicate of 1521947.
msg29158 - (view) Author: Nick Maclaren (nmm) Date: 2006-07-17 09:22
Logged In: YES 
user_id=42444

Yes, it is a duplicate of 1521947.  4.1.0, for what it is
worth, but I have added comments to 1521947.
History
Date User Action Args
2022-04-11 14:56:18adminsetgithub: 43662
2006-07-13 10:56:22nmmcreate