Relative-importing *
Ben Finney
bignose+hates-spam at benfinney.id.au
Sat Jul 28 08:00:03 EDT 2007
Paul Rubin <http://phr.cx@NOSPAM.invalid> writes:
> Steven D'Aprano <steve at REMOVE.THIS.cybersource.com.au> writes:
> > I read "from module import *" as explicitly saying "clobber the
> > current namespace with whatever names module exports". That's what
> > from does: it imports names into the current namespace. It isn't
> > some sort of easy to miss side-effect. If a name already existed,
> > it gets clobbered, just like any other import:
>
> Seems to me that there should be a compiler warning when this
> happens.
The import happens at run-time. The compiler can't catch it.
--
\ "I stayed up all night playing poker with tarot cards. I got a |
`\ full house and four people died." -- Steven Wright |
_o__) |
Ben Finney
More information about the Python-list
mailing list