[Python-ideas] int('0x3241fca1')

MRAB python at mrabarnett.plus.com
Thu Feb 6 17:37:42 CET 2014


On 2014-02-06 15:16, Ethan Furman wrote:
> On 02/06/2014 04:37 AM, Andrew Barnert wrote:
>>
>> Of course it doesn't. A number with an e postfix is a float, not an
>>  int, so why should int parse it? You also can't use int to parse
>>  123.45, or even 123.0, or a quoted string like "123", or "1+0j".
>
> Python 3.4.0b3+ (default:7d0a4f89c6ce, Feb  5 2014, 17:04:36)
> [GCC 4.7.3] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> --> int("123")
> 123
>
By "quoted string" he means '"123"'.


More information about the Python-ideas mailing list