integer's methods

Lutz Horn lutz.horn at posteo.de
Thu Aug 18 09:08:40 EDT 2016


Am 08/18/2016 um 02:58 PM schrieb ast:
>>>> 123.bit_length()
> SyntaxError: invalid syntax

You are not calling a method here because the parser is not finished.

The parser thinks you want to write a float with the value 1.bit_length
which is not valid Python syntax.

Lutz





More information about the Python-list mailing list