[Patches] [Patch #101215] extend 'import x as y' syntax to
'import x as y.z'
Ka-Ping Yee
ping@lfw.org
Fri, 18 Aug 2000 23:50:36 -0700 (PDT)
On Fri, 18 Aug 2000 noreply@sourceforge.net wrote:
> Date: 2000-Aug-18 13:28
> By: twouters
>
> Comment:
> Hmm... I like the idea a bit, but it'm -1 on the approach:
> Special casing 'name.name' is *not* the way to go. Instead,
> what we can do is to allow all normal assignment expressions
> in the 'as <name>' so that you can do
[...]
> from myTools.cPickleFast import Pickler as shelve.Pickler
[...]
> from sys import stdin as x[0], stdout as x[1], stderr as x[2]
[...]
> from sys import stdin as x.in, stdout as x.out, stderr as x.err
[...]
> from sys import sys.version_info as (major, minor, patchlevel, releaselevel, releaseserial)
I support this generalization. It just makes a lot of sense.
-- ?!ng