Jeremy Hylton wrote: > > Gordon's comments are on the money. An import in a module inside a > package should be fully qualified. I'd put that in the style guide if > it were up to me (and, of course, it's not). +1 from here :-) I usually write things like this: from mx.DateTime import now print 'The time is', now() If you don't do so, you'll run into strange problems, the most subtle one I've encountered is with pickled objects... if unpickled inside the same package they can cause the same module to be loaded *twice* with all the consequences attached to this (e.g. issubclass() no longer works). -- Marc-Andre Lemburg ______________________________________________________________________ Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4