On Jan 11, 2007, at 12:55 AM, Steve Chaplin wrote:
>> I have never run into a problem with relative imports, though I don't
>> object to removing them. Why are they bad style and what is the
>> danger?
>
> Its because you can unwittingly end up with module name clashes. There
> can be two different modules in two different directories with the
> same
> name and you import the wrong module by mistake.
Just wanted to chime in here --
with python 2.5, you can have your cake and eat it too:
from .localpkg import Symbol1, Symbol2
from . import localpkg
This disambiguates the "calendar.py" problem that you had (and that
about 90% of python coders have had at least once in their lives). :)
-Peter
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel