[ python-Bugs-1037373 ] len(str(x)) in decimal.py is not Python 2.3 compatible

SourceForge.net noreply at sourceforge.net
Thu Sep 30 02:34:34 CEST 2004


Bugs item #1037373, was opened at 2004-09-29 18:36
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1037373&group_id=5470

Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Nick Coghlan (ncoghlan)
>Assigned to: Raymond Hettinger (rhettinger)
Summary: len(str(x)) in decimal.py is not Python 2.3 compatible

Initial Comment:
One of the stated goals of decimal.py is to remain 2.3
compatible.

This is not currently the case, as the len(str(x))
trick I used to determine the 'number of digits in an
integer' gives the wrong answer for long integers in
Python 2.3 (there is an extra 'L' on the end).


----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2004-09-29 19:34

Message:
Logged In: YES 
user_id=80475

Check again.
str(123L) automatically drops the L
repr(123L) keeps it.

I had run the decimal tests on Py2.3 without exception.

So, please reverify your claim.  If valid, show an example
where it doesn't work, add that example as a test case, and
submit a patch.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1037373&group_id=5470


More information about the Python-bugs-list mailing list