[Python-3000] Stabilizing the C API of 2.6 and 3.0

Stefan Behnel stefan_ml at behnel.de
Thu May 29 09:57:27 CEST 2008


Lisandro Dalcin wrote:
> Chistian, I've posted some weeks ago some observation about the status
> of PyNumberMethods API. The thread link is below, I t did not received
> much atention.
> 
> http://mail.python.org/pipermail/python-3000/2008-May/013594.html
> 
> Now I sumarize that post
> 
> * 'nb_nonzero' was renamed to 'nb_bool'

That's a non-critical change. Usage of these field names outside of the Python
core should be extremely rare.


> * 'nb_inplace_divide' was removed

as was nb_divide, apparently, which is pretty close to the beginning of the
struct.


> * 'nb_hex', 'nb_oct', and 'nb_coerce' are there, but they are unused
> 
> IMHO, the PyNumbersMethods struct should be left as in Py2, or it
> should be cleaned up, that is, all unused slots should be removed.

Since there were already two fields right inside the struct that were removed
(one even before the three you mention), I think it makes sense to remove the
remaining left-overs also. I filed a bug.

http://bugs.python.org/issue2997

Stefan



More information about the Python-3000 mailing list