You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arguments coercion has been removed in py3k for a while, but there are
still some traces of it.
This patch removes the nb_coerce slot and the last usages of __coerce__.
Documentation is also updated: Py_TPFLAGS_CHECKTYPES does not exists
anymore.
Can you redo the patch while keeping the slot *position* (though not the
name or type)? The wasted space is minimal (4-8 bytes per type or class
object) and it means a lot for third party code if the positional struct
initialization never breaks due to insertion or removal of a slot.
Since everyone has a zero here anyway, I propose to name the slot
nb_reserved and make its type int.
As noted in bpo-2997, the nb_divide slot (4th field!) has already been
removed, so Py2 code has to be adapted anyway. I therefore recommend to
just remove all unused fields to get a clean struct for Py3.
Activity
amauryfa commentedon Sep 20, 2007
Arguments coercion has been removed in py3k for a while, but there are
still some traces of it.
This patch removes the nb_coerce slot and the last usages of __coerce__.
Documentation is also updated: Py_TPFLAGS_CHECKTYPES does not exists
anymore.
Note: I ran the testsuite on Windows only.
gvanrossum commentedon Sep 21, 2007
Can you redo the patch while keeping the slot *position* (though not the
name or type)? The wasted space is minimal (4-8 bytes per type or class
object) and it means a lot for third party code if the positional struct
initialization never breaks due to insertion or removal of a slot.
Since everyone has a zero here anyway, I propose to name the slot
nb_reserved and make its type int.
nascheme commentedon Sep 21, 2007
I made the changes as suggest by Guido. Commited as SVN rev 58226.
Thanks for the patch.
gvanrossum commentedon Sep 21, 2007
Thanks Neil!
scoder commentedon Jun 6, 2008
As noted in bpo-2997, the nb_divide slot (4th field!) has already been
removed, so Py2 code has to be adapted anyway. I therefore recommend to
just remove all unused fields to get a clean struct for Py3.