Simple base object for "struct like" classes

Chris Green cmg at uab.edu
Wed Sep 26 17:45:38 EDT 2001


Martin von Loewis <loewis at informatik.hu-berlin.de> writes:

> Chris Green <cmg at uab.edu> writes:
>>  __dict__ does say it is read only in:
>
> That only means that you cannot assign to __dict__. I.e. 
>
Ahh didn't understand that
>
>   self.__dict__.update(kw)
>
> doesn't replace the dictionary, but only changes its contents.

Great method.  I should really read more and try and think less :)

>> Simple class follows:
>
> It appears that you can make this class even simpler:
>

Thanks for your help, I've placed the final results at
http://helium.tucc.uab.edu/~sprout/python/Simple.py

-- 
Chris Green <cmg at uab.edu>
To err is human, to moo bovine.



More information about the Python-list mailing list