homepage

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.

Author eric.smith
Recipients amaury.forgeotdarc, eric.smith, flox, jayanth, mark.dickinson, ronaldoussoren
Date 2011年11月16日.00:10:59
SpamBayes Score 0.0014471136
Marked as misclassified No
Message-id <1321402259.96.0.643211671085.issue13410@psf.upfronthosting.co.za>
In-reply-to
Content
With an unpatched 2.7, this fails for me:
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py
--- a/Lib/test/test_format.py
+++ b/Lib/test/test_format.py
@@ -289,6 +289,17 @@
 else:
 raise TestFailed, '"%*d"%(maxsize, -127) should fail'
 
+ def test_issue13410(self):
+ class Foo(object):
+ def __init__(self, x):
+ self.x = x
+ def __long__(self):
+ return long(self.x)
+ def __float__(self):
+ return float(self.x)
+ '%d' % Foo(22)
+
 def test_main():
 test_support.run_unittest(FormatTest)
 
$ ./python Lib/test/regrtest.py test_format
test_format
test test_format crashed -- <type 'exceptions.TypeError'>: int() argument must be a string or a number, not 'Foo'
1 test failed:
 test_format
History
Date User Action Args
2011年11月16日 00:11:00eric.smithsetrecipients: + eric.smith, ronaldoussoren, amaury.forgeotdarc, mark.dickinson, flox, jayanth
2011年11月16日 00:10:59eric.smithsetmessageid: <1321402259.96.0.643211671085.issue13410@psf.upfronthosting.co.za>
2011年11月16日 00:10:59eric.smithlinkissue13410 messages
2011年11月16日 00:10:59eric.smithcreate

AltStyle によって変換されたページ (->オリジナル) /