Neal Norwitz wrote:
> On 12/11/05, Jim Fulton <[EMAIL PROTECTED]> wrote:
>> Can we officially mark __private as a mistake. Perhaps:
>>
>> - Strongly discourage it in the style guide
> 
> This may be acceptable.
> 
>> - Mark it in the language reference as a deprecated feature
>>
>> - Generate deprecation warnings when it is used?
>>    (This might be too much.)
> 
> I recently asked Guido about name mangling wrt Py3k.  He definitely
> wanted to keep it in.  Unless he changed his mind, I doubt he would
> deprecate it.  His rationale was that there needs to be a way to
> handle name collision with multiple inheritance.

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.

Cheers,
Nick.

-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
_______________________________________________
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