Message316274
> I don't think this will need drastic changes.
IIRC LOAD_NAME loads from the *local* scope, which will be the synthetic
function created for the comprehension (whose scope contains the loop
control variables). We may need a new opcode similar to LOAD_GLOBAL that
looks in two non-local directories rather than just one before falling back
to builtins; and the function object would need to have a link to both the
class dict and the global dict -- currently function objects gave a
__globals__ link but there's no chaining. Or perhaps __globals__ could be
set to a chainmap referencing the class dict and the globals? |
|
Date |
User |
Action |
Args |
2018-05-07 15:30:27 | gvanrossum | set | recipients:
+ gvanrossum, georg.brandl, ajaksu2, kaizhu, serhiy.storchaka, John.McDonald, charettes, levkivskyi, Mariatta |
2018-05-07 15:30:27 | gvanrossum | link | issue3692 messages |
2018-05-07 15:30:27 | gvanrossum | create | |
|