"private" variables a.k.a. name mangling (WAS: What is print? A function?)

Richie Hindle richie at entrian.com
Tue Jan 25 18:14:20 CET 2005


[Toby]
> The problem occured because the double-underscore mangling uses the class 
> name, but ignores module names. A related project already had a class named C 
> derived from B  (same name - different module).

Yikes!  A pretty bizarre case, but nasty when it hits.  I guess the
double-underscore system can give you a false sense of security.

-- 
Richie Hindle
richie at entrian.com




More information about the Python-list mailing list