On Apr 29, 2008, at 5:42 PM, Peter Todd wrote:

Is there a __getattribute__ work-alike in Cython?

Essentially I need direct control over an objects tp_getattro and
tp_setattro slots to implement a wrapper class. Specificly
wrapped.__class__ should go to the wrapped objects class attribute, not
the wrapping objects __class__ attribute.

__getattr__ outputs C-source that includes a call to
PyObject_GenericGetAttr first, and won't run my code if that call
succeeds.

Thanks,

Peter

Not that I'm aware of, though I'd imagine that implementing __getattribute__ (if it exists) as being called at the top of this function would be fairly easy to do. One would want to match Python symantics exactly.

- Robert

Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to