Message2512

Author cgroves
Recipients
Date 2006-06-26.14:09:25
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.
History
Date User Action Args
2008-02-20 17:18:32adminlinkissue1512745 messages
2008-02-20 17:18:32admincreate