[Python-Dev] python package
Gordon McMillan
gmcm@hypernet.com
Sat, 13 Jul 2002 14:21:07 -0400
On 13 Jul 2002 at 19:58, M.-A. Lemburg wrote:
> Gordon McMillan wrote:
> > Getting
> > from <toplevelname> import urllib
> > and
> > import urllib
> >
> > to return the same (is, not equals) object will
> > require very delicate surgery on some very difficult
> > code. And without it, most non-trivial scripts will
> > break in very mysterious ways.
>
> Not really. The following code does all it takes to
> make this work for e.g. having 'import DateTime' and
> 'from mx import DateTime' provide the same symbols:
[snip hackery]
> The module objects would be different, but that's
> just about it.
Which was exactly my point. Much code that does
*not* use "from ... import ..." in fact relies on
having the same module object.
-- Gordon
http://www.mcmillan-inc.com/