On 12/11/05, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Keeping it for Py3K would be fine, if the mechanism was changed so that it
> actually worked right. That is, the mechanics would be such that any two
> concurrently existing classes would be guaranteed to mangle the names of their
> private variables differently - simply using the class name (as now) doesn't
> guarantee that when inheriting from a class in a different module and reusing
> the name.

I know about the fear of accidental reuse of class names, but I don't
find it a compelling argument. Python encourages shallow class
hierarchies. It's easy to find all the base classes (look at __mro__).
It's unlikely that a hierarchy refactoring will introduce a new name
conflict after the fact.

Also, I like the current, well-defined mangling algorithm; it means
that when I'm in the debugger I can manually mangle or unmangle names
as required.

--
--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