What a curious assignment.

Mike Meyer mwm at mired.org
Wed Nov 23 15:41:17 EST 2005


"bonono at gmail.com" <bonono at gmail.com> writes:
> I believe he knows about inheritance, but not about the behaviour of
> the assignment. In many other OO languages, I believe you cannot have
> the same name for both instance variable and class variable. javascript
> has similar behaviour.

I think more important is that in many languages you can't dynamically
add attributes to an object. So an attempt to bind a.i will either
fail, or be an assignment to A.i.

      <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list