[Python-Dev] n.numbits: method or property?

Antoine Pitrou solipsis at pitrou.net
Wed Nov 12 17:11:36 CET 2008


Mark Dickinson <dickinsm <at> gmail.com> writes:
> 
> Right:  numbits is only a natural property of a *binary* integer.
> 
> On the other hand, I can't realistically see Python ever adopting a
> non power-of-two based implementation.

No, but Python is duck-typed and alternate integer classes could adopt such an
implementation while trying to respect the Python-level long API.

cheers

Antoine.




More information about the Python-Dev mailing list