Re: Underscore data hiding (was python development practices?)
by Martijn Faassen other posts by this author
Nov 1 2001 11:53PM messages near this date
Re: Underscore data hiding (was python development practices?)
|
Re: Underscore data hiding (was python development practices?)
Russell E. Owen <owen@[...].emu> wrote:
> Personally, I prefer the effect of double underscore for this case, as
> well. I can easily get to the variables by applying the name mangling
> myself, yet cannot accidentally stomp on the variables in a subclass.
> To each his/her own.
That's a good point. I haven't done this because I've never remembered
the name mangling rule. I'm not even sure if it's really part of the
Python standard, but I'd guess it should be.
What if you don't know what superclass your variable or method might be coming
coming from? I suppose this would not be a common event, though.
Regards,
Martijn
--
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?
--
http://mail.python.org/mailman/listinfo/python-list
Thread:
Peter Wang
Peter Hansen
Toby Dickenson
Tim Peters
Steve Holden
Steve Holden
Cliff Wells
Tim Peters
Martijn Faassen
Cliff Wells
Cliff Wells
Martijn Faassen
Martijn Faassen
Paul Rubin
Russell E. Owen
Barry A. Warsaw
Martijn Faassen
Peter Wang
Skip Montanaro
John Roth
David Bolen
Peter Wang
Peter Wang
Skip Montanaro
Chris Tavares
Darren Collins
David Bolen
Paul Rubin
Paul Rubin
Peter Wang
F Basegmez
Richard Jones
Richard Jones
Neal Norwitz
Graham Ashton
Peter Wang
Russell E. Owen
Skip Montanaro
Cliff Wells
Hung Jung Lu
Wade Leftwich
Peter Wang
Peter Wang
Peter Wang
Chris Gonnerman
Paul Rubin
Andrew Dalke
Paul Rubin
Luigi Ballabio
Paul Rubin
Tim Peters
John Roth
Paul Rubin
Richard Jones
|