On 9/19/07, Rob Crowther <[EMAIL PROTECTED]> wrote: > > This is the documentation for PyNumberMethods right now. > > PyNumberMethods *tp_as_number; > XXX > > > I've managed to wrap GNU MP floats and add rich comparisons, but there's a > sore lack of documentation on how to implement the Number interface. Given a > bit of pointers on where to look, an alpha version of this extension will be > available tomorrow, most likely.
I'm not sure where you saw that 'XXX' -- are you looking at Py3k docs? In that case, don't bother, the Numbers API has hardly changed, just use the Python 2.5 docs. Or the Python 2.0 docs, as there's little difference ;) But it's true there isn't all that much documentation on those parts. The PyNumberMethods struct is really straightforward, you should be able to guess what each function is supposed to do just by looking at the function signature and the name. But when in doubt, the best place to go is the Python source. Just look at Objects/intobject.c or Objects/longobject.c. -- Thomas Wouters <[EMAIL PROTECTED]> Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
_______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com