Paul Rubin wrote:
> Gregor Horvath <[EMAIL PROTECTED]> writes:
> 
>>>If you don't want the compiler to make sure your private instance
>>>variables stay private, then don't declare them that way.  You're the
>>>one asking for less flexibility.
>>
>>I want to declare them as private, but want to give the flexibilty to
>>access them at the users own risk.
> 
> 
> What else do you want to let users do at their own risk?  Treat
> integers as pointers, like in C?  Both are violations of type safety.
> 
> 
>>Declaring everything as public is nonsene, because there should be a
>>garanteed stable interface.
> 
> 
> You could have a "friend" declaration like in C++, if you want to let
> some class see the private instance variables of another class.  
> 
> I can't think of a single time that I've ever seen a legitimate use of
> name mangling to reach from one class into another in a Python
> application (I don't count something like a debugger).  If you're got
> some concrete examples I wouldn't mind looking.

[psst ... do you think they've stopped now?]
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC                     www.holdenweb.com
PyCon TX 2006                          www.pycon.org

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to