[Python-Dev] n.numbits: method or property? (original) (raw)
Mark Dickinson dickinsm at gmail.com
Wed Nov 12 17:07:52 CET 2008
- Previous message: [Python-Dev] n.numbits: method or property?
- Next message: [Python-Dev] n.numbits: method or property?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Nov 12, 2008 at 3:15 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
As for numbits, I think it should be a method, because while it's very fast for the current implementation of longs, it could be longer to calculate for a long implementation using something other than a power-of-2 base.
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.
Mark
- Previous message: [Python-Dev] n.numbits: method or property?
- Next message: [Python-Dev] n.numbits: method or property?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]