Michael Chermside wrote: >> Right now, we say that there's one rule for all *normal* attributes >> and >> methods, and a slightly different rule for all double-underbar >> methods.
Guido responded: > But it's not normal vs. __xyzzy__. A specific set of slots (including > next, but excluding things like __doc__) get special treatment. The > rest don't. All I'm saying is that I don't care to give __context__ > this special treatment. Perhaps we should officially document that the effect on special methods of overriding a class attribute with an instance attribute is undefined, for some given set of attributes? (I would say all double-underbar methods, but it sounds like the list needs to also include next().) Otherwise, it seems like people might write code that relies on the current behavior, which will then break if we eg turn __context__ into a slot. (It sounds like you want to reserve the right to change this.) Well, of course, people may rely on the current behavior anyway, but at least they'll have been warned. :) -Edward _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com