integer's methods

ast nomail at com.invalid
Thu Aug 18 09:08:00 EDT 2016


"Marko Rauhamaa" <marko at pacujo.net> a écrit dans le message de 
news:87k2fefcyu.fsf at elektro.pacujo.net...
> "ast" <nomail at com.invalid>:
>>>>>> 123.bit_length()
>> SyntaxError: invalid syntax
>> I fell into that trap myself.
>> CPython's lexical analyzer can't handle a dot after an integer literal
> so you must add a space in between "123" and ".".
>>> Marko

Indeed.
Maybe because of a confusion with the decimal point.
Thx 


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /