[Cython] __getattribute__
Robert Bradshaw
robertwb at math.washington.edu
Thu May 8 18:39:07 CEST 2008
Thanks! It works great for me.
On May 4, 2008, at 8:37 PM, Peter Todd wrote:
> On Sun, May 04, 2008 at 01:15:32AM -0400, Peter Todd wrote:
>> Here's my first patch. This correctly implements __getattribute__ and
>> __getattr__ in the single class case. FWIW I also have a mercurial
>> tree
>> if it'd be better to pull from it than apply patches.
>>
>> I'm working on making subclasses behave correctly, I've got test
>> cases
>> written up showing where things fail, but no solutions to that
>> written
>> yet. The slot_tp_getattro stuff Stefan mentioned is useful though.
>
> __getattr(ibute)__ support is now working with subclasses. The
> semantics
> should match Python exactly if my test cases are correct. All that has
> changed from the previous patch is that at compile time base
> classes are
> checked for __getattr(ibute)__ methods and those methods are used if
> found.
>
> Attached is an hg bundle of the two commits.
>
> --
> http://petertodd.org 'peter'[:-1]@petertodd.org
> <getattr_support.hg>_______________________________________________
> Cython-dev mailing list
> Cython-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/cython-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://codespeak.net/pipermail/cython-dev/attachments/20080508/46ab919d/attachment.pgp
More information about the Cython-dev
mailing list