Friday Finking: initialising values and implied tuples

Rob Cliffe rob.cliffe at btinternet.com
Mon Apr 5 15:35:32 EDT 2021



On 05/04/2021 18:33, Chris Angelico wrote:
>
> Firstly, anything with any variable at all can involve a lookup, which
> can trigger arbitrary code (so "variables which do not occur on the
> LHS" is not sufficient).
Interesting.  I was going to ask: How could you make a variable lookup 
trigger arbitrary code?
Then I saw your post in the "Yield after the return in Python function" 
thread.  (Took me a while to understand it.)  So I ask:
Can you make a variable lookup trigger arbitrary code, other than in 
code passed to eval/exec/compile?
TIA
Rob Cliffe


More information about the Python-list mailing list