Problem with sub-classing

Peter Otten __peter__ at web.de
Mon Jul 17 16:18:57 EDT 2006


Bernard Lebel wrote:

> Okay, that make sense.
> 
> Now the question is: regarding the re-binding behavior, is this
> actually problematic? By that I mean that is it good coding practice
> to avoid this issue altogether as much as possible, or is it okay to
> live with it if you use the __init__ argument trick you have shown?

I suggested the "argument trick" for diagnosis only. 

One /good/ coding practice is to choose descriptive names for (toplevel)
objects. Another is to avoid

from module import *

style imports which tend to be the most common source of name clashes.


Peter






More information about the Python-list mailing list