> n.numbits: method or property?

Fredrik Johansson and me agree to use a property.

My last patch (numbits-4.patch) implement numbits as a property. Examples:
>>> (1023).numbits
10
>>> x=1023L; x.numbits
10L
>>> x=2**(2**10); x.numbits
1025L
>>> x=2**(2**10); x.numbits.numbits   # combo!
11L

Victor
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to