<br><br><div><span class="gmail_quote">On 9/19/07, <b class="gmail_sendername">Rob Crowther</b> <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This is the documentation for PyNumberMethods right now.<br><br><blockquote>PyNumberMethods *tp_as_number;<br>XXX<br></blockquote><br>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.
</blockquote><div><br>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 ;)<br><br>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.
<br><br></div></div>-- <br>Thomas Wouters <<a href="mailto:firstname.lastname@example.org">email@example.com</a>><br><br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!