name mangling works most of the time but not when a subclass has the same name as a super class; for example if two classes in different modules m2.A extends m1.A, then m2.A.foo will hide m1.A.foo because both of them become _A__foo; is there an option to enable a "fuller" name mangling, namely, mangle class fields with a unique class identifier?
# m1.py
class C:
def __foo(self):
print('C1')
def bar(self):
self.__foo()
# main.py
from m1 import C as C1
class C(C1):
# i mangle this for internal use within this class, not expecting it to
# break a super class method; so i cant safely use a name even if it is
# mangled; sad, is there a way to mangle with a guid across all classes?
def __foo(self):
print('CM')
C().bar() # CM not C1