would be nice: import from archive

Peter Otten __peter__ at web.de
Sun Aug 29 10:27:55 CEST 2004


Paul Rubin wrote:

> "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__.

@signed
@certfile('mycerts.pem')
import x

anybody?


Peter



More information about the Python-list mailing list