[Pyrex] Use of ctypdef MyClass [object, type]

Matthieu Brucher matthieu.brucher at gmail.com
Thu Oct 11 11:13:12 CEST 2007


>
> Assuming you're writing a "book", I hope you meant "concise".



Yes, it will be concise about Pyrex, so I could set this aside (but as it is
mentioned when talking about importing a Python type like complex, I thought
about telling everything about this syntax).


Giving good
> examples means leaving out everything that is not necessary to avoid
> confusion
> or mental divergence. So, if you're not writing specifically about how to
> make
> types public and how to export them to external code, you should not use
> the
> syntax you mentioned in your book.



Yes, you're probably right. Usually, people won't use this. I'll think about
it.


The names given the "cdef public ... [ object NAME, type NAME ]" syntax
> allow
> Pyrex to export the internally mangled names as readable, user-defined
> names
> in a header file to make them available to external code. That's almost
> all
> there is to it.


OK, so it is a very narrow field of application.

Thank you for the explanation.

Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.copyleft.no/pipermail/pyrex/attachments/20071011/9ead94bb/attachment.html 


More information about the Pyrex mailing list