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 rhettinger
Recipients
Date 2003-03-05.19:40:59
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=80475

Values like 'str' are being properly flagged as invalid 
literals.  We need to find out the value and type that is 
causing the error in Pmw.  Can you insert a "print >> 
sys.stderr, type(s), repr(s), str(s)" at the beginning of the 
atoi() code.

The lines in the string.atoi() code have been around since 
Py1.6, so if this is a new error, then it means that the 
behavior of int(s, 10) has changed in subtle ways or that 
the object s has changed in some way.

I would like to fix only the thing that caused the error and 
avoid altering the string.atoi code which has been around 
for so long.

The easiest way to track this one down is to simplify the 
bug report to something like this:
  
string.atoi(s, 10)runs under Py2.2 but fails under Py2.3 
when s is UserString with the value of " 10".

BTW, a simpler workaround is to change string.atoi to:

def atoi(s, *args) : 
    return _int(s, *args) 

History
Date User Action Args
2007-08-23 14:11:40adminlinkissue697591 messages
2007-08-23 14:11:40admincreate