Magic methods in extension types
Greg Ewing
greg at cosc.canterbury.ac.nz
Tue Apr 27 00:56:33 EDT 2004
Jacek Generowicz wrote:
> You are, in summary, saying that by _far_ the simplest way of adding
> __iadd__ to an extenion type is via tp_as_number->nb_inplace_add,
> aren't you.
It's the *only* way to do it.
<plug shamelevel="0">
Unless you use Pyrex, of course:
http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
</plug>
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list