On 12/12/05, Scott David Daniels <[EMAIL PROTECTED]> wrote:
> Perhaps "The __ name convention is designed for 'mixins'; as a means of
> enforcing "private" it is both ineffective and annoying.  For example,
> distutils.msvccompiler uses a bunch of instance variables which would I
> would like to access in a subclass, but are "unavailable" because the
> author could not imagine why I would need them.

But __private's use case is *not* restricted to mixins; this seems to
be a common misconception. It is a tool (not the only one!) for name
conflict avoidance in all inheritance situations, including single
inheritance.

BTW let me note that inheritance is overused. People should get used
to containment patterns (e.g. facade, delegate etc.) in favor of
inheritance patterns.

--
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
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

Reply via email to