[Python-Dev] Parrot -- should life imitate satire?
Skip Montanaro
skip@pobox.com (Skip Montanaro)
Tue, 31 Jul 2001 09:51:22 -0500
Skip> The main stumbling block was that pesky "from module import *"
Skip> statement. It could push an unknown quantity of stuff onto the
Skip> stack
Greg> Are you *sure* about that? I'm pretty certain it can't be true,
Greg> since the compiler has to know at all times how much is on the
Greg> stack, so it can decide how much stack space is needed.
Thomas> I think Skip meant it does an arbitrary number of
Thomas> load-onto-stack
Thomas> store-into-namespace
Thomas> operations. Skip, you'll be glad to know that's no longer true
Thomas> :) Since 2.0 (or when was it that we introduced 'import as' ?)
Thomas> import-* is not a special case of 'IMPORT_FROM', but rather a
Thomas> separate opcode that doesn't touch the stack.
I'm not sure what I meant any more. (They say eye witness testimony in a
courtroom is quite unreliable.) I'm pretty sure Greg's analysis is at least
partly correct (in that that couldn't have been why I failed to implement a
converter for IMPORT_FROM). I went back and looked briefly at my old code
last night (which was broken when I put it aside - don't *ever* do that!)
and could find nothing that would indicate why I didn't like
"from-import-*". The instruction set converter would refuse to try
converting any code that contained these opcdes: {LOAD,STORE,DELETE}_NAME,
SETUP_{FINALLY,EXCEPT}, or IMPORT_FROM. At this point in time I'm not sure
which of those six opcodes were just ones I hadn't gotten around to writing
converters for and which were showstoppers.
wish-i-had-more-time-for-this-ly y'rs,
Skip