empty classes as c structs?
Steven Bethard
steven.bethard at gmail.com
Thu Feb 10 12:29:38 EST 2005
Alex Martelli wrote:
> Steven Bethard <steven.bethard at gmail.com> wrote:
>>I like the idea of chain, though, so I'll probably add the class with
>>just __init__ and __getattribute__ to the current implementation. I'm
>>willing to be persuaded, of course, but for the moment, since I can see
>>a few different options, I'm refusing the temptation to guess on the
>>"most natural" behavior for __delattr__ and __setattr__... =)
>
>
> That's probably best in terms of API. Not too sure about the
> implementation (why wouldn't __getattr__ suffice, holding the bunches in
> an attribute with a magicname?) but that's a secondary issue.
Yeah, I had it written with __getattr__ at first... Not sure why I
switched over... ;) I'll probably switch it back.
Steve
More information about the Python-list
mailing list