From: Kevin A. <al...@se...> - 2001-11-08 08:40:31
|
> From: Neil Hodgson > > Kevin Altis: > > > What I'm wondering is whethr the imports above are > > considered "good style". I remember Neil bringing this > > up long ago, but I don't know if there was a general rule > > other than avoid import * when possible, which of > > course is always done with wxPython.wx, but other than > > that how does the list above look? > > There is a 'What are the "best practices" for using import in > a module?' > FAQ: > http://www.python.org/cgi-bin/faqw.py?req=show&file=faq04.100.htp > My aversion to "import *" comes from the consensus on comp.lang.python, > especially from Tim Peters - all praise the timbot!. It is also a > good idea > to try to limit dependencies as designs where each module calls a lot of > other modules are hard to understand. Thanks, I forgot about the FAQ. I think one of the problems is a circular reference, so I'm going to switch to the import module form everywhere if possible and then do explicit references in the code. ka |