'import x as y' stops the show (was: Re: [Python-Dev] [Patch #101135] 'import x as y' and 'from x import y as z' (fwd))

Thomas Wouters thomas@xs4all.net
Thu, 10 Aug 2000 07:55:10 +0200


On Thu, Aug 10, 2000 at 07:37:44AM +0000, Peter Schneider-Kamp wrote:
> Thomas Wouters wrote:

> > If it still goes crashy crashy after you re-make the grammar, I'll, well,
> > I'll, I'll make Baldrick eat one of his own dirty socks ;)

> I just found that out for myself. The syntaxerror in the
> second examples lead my way ...

> Sorry for the hassle, but next time please remind me that
> I have to remake the grammar.

It was late, last night, and I have to force myself not to write essays when
submitting a patch in the first place ;-P How about we fix the dependencies
so that the grammar gets re-made when necessary ? Or is there a good reason
not to do that ?

> perversely-minded-note:
> What about 'from string import *, join as j'?
> I think that would make sense, but as we are not fond of
> the star in any case maybe we don't need that.

'join as j' ? What would it do ? Import all symbols from 'string' into a
new namespace 'j' ? How about you do 'import string as j' instead ? It means
you will still be able to do 'j._somevar', which you probably wouldn't in
your example, but I don't think that's enough reason :P

> P.S.: I'd like to see Baldrick do that. What the heck is
>       a Baldrick? I am longing for breakfast, so I hope
>       I can eat it. Mjam.

Sorry :) They've been doing re-runs of Blackadder (1st through 4th, they're
nearly done) on one of the belgian channels, and it happens to be one of my
favorite comedy shows ;) It's a damned sight funnier than Crocodile Dundee,
hey, Mark ? <nudge> <nudge> <wink> <wink> :)

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!