Steve Holden wrote:
> To avoid naming conflicts, Python provides a mechanism (name mangling)
> which pretty much guarantees that your names won't conflict with anybody
> else's, *even if you subclass a class whose methods use the same name*.
as long as you don't cheat, that is:
# your code
class Secret:
def __init__(self):
self.__hidden = "very secret value"
# my code
from yourcode import Secret
class Secret(Secret):
def gethidden(self):
return self.__hidden
s = Secret()
print s.gethidden()
</F>
--
http://mail.python.org/mailman/listinfo/python-list