Message2512
Currently Jython only allows format strings to have a
maximum precision of 250 for all formatting types but
python only restricts the precision on floats. ie
milo:~ groves$ jytip
Jython 2.2a1 on java1.5.0_06 (JIT: null)
Type "copyright", "credits" or "license" for more
information.
>>> '%.250s' % 'hello'
'hello'
>>> '%.400s' % 'hello'
Traceback (innermost last):
File "<console>", line 1, in ?
OverflowError: formatted float is too long (precision
too long?)
>>> ^D
milo:~ groves$ python
Python 2.4.3 (#1, Apr 7 2006, 10:54:33)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for
more information.
>>> '%.250s' % 'hello'
'hello'
>>> '%.400s' % 'hello'
'hello'
The attached patch moves the precision check to the
float only formatting section. |
|
Date |
User |
Action |
Args |
2008-02-20 17:18:32 | admin | link | issue1512745 messages |
2008-02-20 17:18:32 | admin | create | |
|