'complex' function with string argument.
Marko Rauhamaa
marko at pacujo.net
Mon Mar 17 15:22:18 EDT 2014
Chris Angelico <rosuav at gmail.com>:
> On Tue, Mar 18, 2014 at 5:15 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
>> Is "-2.0" a literal?
>>
>> What's the outcome of
>>
>> -2.0.__str__()
>
> If you mean (-2.0).__str__(), then it returns '-2.0', but that proves
> nothing.
The point is, you don't need to "philosophize" about complex literals
when even negative numbers don't have literals in Python.
Marko
More information about the Python-list
mailing list