[EMAIL PROTECTED] wrote:
> so the following would not result in any conflicts
> 
> class A:
>    def __init__(self):
>       self.__i= 0
> 
> class B(A):
>    def __init__(self):
>       A.__init__(self)
>       self.__i= 1
> 

Be careful here.  The above won't result in any conflicts, but related 
cases, where you have two classes with the same name in different 
modules, may still result in conflicts.  See my previous posts on this:

http://groups.google.com/group/comp.lang.python/msg/503984abaee1c2b5
http://groups.google.com/group/comp.lang.python/msg/f03183a2c01c8ecf

However, I tend not to use double-underscore name mangling, and I don't 
think I've ever had a shadowing problem, so clearly I wouldn't have 
shadowing problems with double-underscore name mangling either...

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

Reply via email to