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

Ethan Furman ethan at stoneleaf.us
Thu Feb 6 16:16:39 CET 2014


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

--
~Etahn~


More information about the Python-ideas mailing list