Facundo Batista <[EMAIL PROTECTED]> added the comment:
I find similar speedups:
isinstance(42, int) -2%
isinstance(42, type) 45%
isinstance(object, type) -1%
isinstance(object, int) 42%
isinstance(float, int) 44%
(both negative ones are actually lower than original, but so low that it
could be considered timing glitches)
However, also I have an error in the test_exceptions.py suite:
[EMAIL PROTECTED]:~/devel/reps/python/trunk$ ./python
Lib/test/test_exceptions.py
testAttributes (__main__.ExceptionTests) ... ok
testInfiniteRecursion (__main__.ExceptionTests) ... FAIL
testKeywordArgs (__main__.ExceptionTests) ... ok
testRaising (__main__.ExceptionTests) ... ok
testReload (__main__.ExceptionTests) ... ok
testSettingException (__main__.ExceptionTests) ... ok
testSlicing (__main__.ExceptionTests) ... ok
testSyntaxErrorMessage (__main__.ExceptionTests) ... ok
testUnicodeStrUsage (__main__.ExceptionTests) ... ok
test_WindowsError (__main__.ExceptionTests) ... ok
======================================================================
FAIL: testInfiniteRecursion (__main__.ExceptionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "Lib/test/test_exceptions.py", line 336, in testInfiniteRecursion
self.assertRaises(RuntimeError, g)
AssertionError: RuntimeError not raised
----------------------------------------------------------------------
Ran 10 tests in 0.031s
FAILED (failures=1)
Traceback (most recent call last):
File "Lib/test/test_exceptions.py", line 351, in <module>
test_main()
File "Lib/test/test_exceptions.py", line 348, in test_main
run_unittest(ExceptionTests)
File "/home/facundo/devel/reps/python/trunk/Lib/test/test_support.py",
line 577, in run_unittest
_run_suite(suite)
File "/home/facundo/devel/reps/python/trunk/Lib/test/test_support.py",
line 560, in _run_suite
raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
File "Lib/test/test_exceptions.py", line 336, in testInfiniteRecursion
self.assertRaises(RuntimeError, g)
AssertionError: RuntimeError not raised
----------
nosy: +facundobatista
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2534>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com