Python 2.3: int() ?

Peter Hansen peter at engcorp.com
Fri Jan 17 12:13:40 EST 2003


Carsten Gaebler wrote:
> 
> Hi there,
> 
> I just read the 2.3 'highlights' page on python org, and I'm a bit
> confused: it says '# int() - this can now return a long when converting
> a string with many digits, rather than raising OverflowError.'
> 
> What does 'can' mean here? Can I switch between returning a long or
> raising an exception?

It means "can, when it needs to", as opposed to "cannot" which is 
how it was before.

-Peter




More information about the Python-list mailing list