empty classes as c structs?

Michael Spencer mahs at telcopartners.com
Sat Feb 5 15:23:31 EST 2005


Alex Martelli wrote:
> Nick Coghlan <ncoghlan at iinet.net.au> wrote:
>    ...
> 
>>Michael Spencer also posted ...
> 
> Wasted indirection, IMHO.  A better implementation:
> 
> class attr_view(object):
>     def __init__(self, data):
>         self.__dict__ = data
> 
> 
> Alex

Indeed!  A complete brain-blip


Michael




More information about the Python-list mailing list