[Steven Bethard] >Ahh. I never run into this because I never import objects directly >from modules. So, instead of:
> from elementtree.ElementTree import ElementTree > ... > ElementTree(...) >I almost always write something like: > import elementtree.ElementTree as et > ... > et.ElementTree(...) This is a bit off-topic, but I felt like sharing our experience. One consultant we once hired here was doing exactly that (importing over two-letter abbreviations). >Thus, all objects that were imported from external modules are always >immediately identifiable as such by their prefixed module name. I do >see though that if you like to import the objects directly from the >module this could be confusing. Everybody here agrees that this style makes the code much less legible. Partly because of the constant indirection. Also because it imposes learning all those two-letter abbreviations before reading a module, and the learning has to be redone on each visit, it just does not stick. So, we try to routinely replace abbreviations with the real names whenever we have to play in one module written by this consultant. But it only goes a little bit at a time. We should probably suffer taking the time, dive in it all, and get rid of this style once and for all... -- François Pinard http://pinard.progiciels-bpi.ca _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com