importing symbols from module objects
phr-n2001 at nightsong.com
Wed Sep 26 07:43:01 CEST 2001
Don O'Donnell <donod at home.com> writes:
> Paul Rubin wrote:
> > Is there a non-messy way to import a symbol from a module object?
> > I don't see one but I might be missing something.
> I'm probably missing something here, but why not just:
> SpamException = breakfastdish.SpamException
Hey, that ought to work. I'm the one that missed something. I'm not
totally used to this exceptions=classes=instances stuff yet. Now I
have to wonder what "from foo import bar as parrot" really does.
Maybe pretty much the same thing. Anyway, thanks, I'll give it a try.
More information about the Python-list