Message74755
I consider .numbits to be an internal property of ints and would prefer
it accessed that way. To me, this sort of thing is what property() is for.
Guido has said that the nuisance of tacking on otherwise unnecessary
empty parens is a warning to the user that getting the answer might take
a long time.
Another tack is to notice that numbits is the length of the bit sequence
representation of an int (excepting 0) and give ints a .__len__ method
;-). I would not expect that suggestion to fly very far, though. |
|
Date |
User |
Action |
Args |
2008-10-14 17:09:34 | terry.reedy | set | recipients:
+ terry.reedy, loewis, rhettinger, mark.dickinson, vstinner, fredrikj |
2008-10-14 17:09:33 | terry.reedy | set | messageid: <1224004173.85.0.627505499161.issue3439@psf.upfronthosting.co.za> |
2008-10-14 17:09:32 | terry.reedy | link | issue3439 messages |
2008-10-14 17:09:31 | terry.reedy | create | |
|