would be nice: import from archive
Paul Rubin
http
Sat Aug 28 21:01:40 EDT 2004
"Terry Reedy" <tjreedy at udel.edu> writes:
> 'import x' is syntactic sugar for 'x = __import__('x')'. I do not see it
> as necessary that sugar for the common case need cover every possible case.
> So, how about giving __import__ had an optional param 'signed' defaulted to
> False, to allow signed =True or signed = CA?
Man, that __import__ thing is ugly. 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})
so you could say
import x(signed)
or
import x(signed, certfile='mycerts.pem')
or whatever.
More information about the Python-list
mailing list