Message147759
Interesting! Same here.
Using eval() fails with or without -v:
--- a/Lib/test/test_format.py
+++ b/Lib/test/test_format.py
@@ -289,6 +289,18 @@
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)
+ eval(u'%d' % Foo(22))
+ eval('%d' % Foo(22))
+
+
def test_main():
test_support.run_unittest(FormatTest)
I've put both '%d' and u'%d' here, but it also fails with just one of them. |
|
Date |
User |
Action |
Args |
2011-11-16 09:47:21 | eric.smith | set | recipients:
+ eric.smith, ronaldoussoren, amaury.forgeotdarc, mark.dickinson, ezio.melotti, flox, jayanth |
2011-11-16 09:47:21 | eric.smith | set | messageid: <1321436841.52.0.0412794847407.issue13410@psf.upfronthosting.co.za> |
2011-11-16 09:47:20 | eric.smith | link | issue13410 messages |
2011-11-16 09:47:20 | eric.smith | create | |
|