I am reading a book about Python and along I'm doing some experimentations on the interactive prompt.
During those experimentations I have noticed that if I code 1.bit_length()
(or any other type specific method) it doesn't work.
Yes, I know that the reason is that Python doesn't get the number and I need to type (1).bit_length()
, but my question is: why? Why did they do so? I mean there are so many developers and they couldn't develop a parser that gets 1.bit_length()
?