would be nice: import from archive

Terry Reedy tjreedy at udel.edu
Sat Aug 28 15:57:38 EDT 2004


"Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> wrote in message 
news:7xd61b8uh2.fsf at ruckus.brouhaha.com...
> Benjamin Niemann <pink at odahoda.de> writes:
>> import mymodule
>> verify_module(mymodule)
>
> This is no good.  The import runs any code in the module, so the sig
> has to verify BEFORE the module loads.

'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?

Terry J. Reedy






More information about the Python-list mailing list