Python dynamic attribute creation

Carl Banks pavlovevidence at gmail.com
Mon Jun 28 01:10:07 EDT 2010


On Jun 27, 3:49 am, Bruno Desthuilliers
<bdesth.quelquech... at free.quelquepart.fr> wrote:
> WANG Cong a écrit :
>
> > On 06/26/10 00:11, Neil Hodgson <nyamatongwe+thun... at gmail.com> wrote:
>
> >> WANG Cong:
>
> >>> 4) Also, this will _somewhat_ violate the OOP princples, in OOP,
> >>> this is and should be implemented by inherence.
> >>    Most object oriented programming languages starting with Smalltalk
> >> have allowed adding attributes (addInstVarName) to classes at runtime.
>
> > Thanks, I have to admit that I know nothing about Smalltalk.
>
> Then you really don't know much about OO.

I don't really know much about Smalltalk either.


Carl Banks



More information about the Python-list mailing list