Mark Dickinson <[EMAIL PROTECTED]> added the comment: The latest patch from Victor looks good. A few comments:
(1) the number of bits should be computed first directly using C arithmetic, and only recomputed using PyLong arithmetic if the C computations overflow. For one thing, overflow is going to be very rare in practice; for another, in the sort of applications that use .numbits(), speed of numbits() is often critical. (2) Just as a matter of style, I think "if (x == NULL)" is preferable to "if (!x)". At any rate, the former style is much more common in Python source. (3) the reference counting all looks good. (4) I quite like the idea of having numbits be a property rather than a method---might still be worth considering? _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3439> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com