[Python-ideas] 1_000_000

Greg Ewing greg.ewing at canterbury.ac.nz
Sat May 7 09:46:57 CEST 2011


Bruce Leban wrote:
> I'm opposed to changing int so that int('123_456') ignores the _ as that 
> will change the behavior of existing code and could break apps.

But int('123_456', 0) should perhaps work? (On the grounds that
it parses numbers using the same syntax as Python source.)

-- 
Greg



More information about the Python-ideas mailing list