would be nice: import from archive

Paul Rubin http
Sun Aug 29 03:36:53 EDT 2004


"Terry Reedy" <tjreedy at udel.edu> writes:
> >  I think it's better to extend the syntax, e.g.
> >  import x(a,b) => __import__('x', {'a':None, 'b':None})
> >  import x(a=v1,b=v2)=> __import__('x', {'a':v1, 'b':v2})
> 
> Identifier(args) is currently a call of identifier with args and 
> overloading that syntax to mean somthing similar but different is, to me, 
> even uglier in a different sort of way.

Ok, use brackets instead:  import x[a,b].
Then it's just a matter of overloading the index operator on __import__.



More information about the Python-list mailing list