<br><br><div class="gmail_quote">On Wed, Mar 30, 2011 at 3:26 PM, Raymond Hettinger <span dir="ltr"><<a href="mailto:raymond.hettinger@gmail.com">raymond.hettinger@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
Since eval/exec can use arbitrary mappings for locals, you can use your custom dictionary while executing arbitrary python code.  Essentially, you're executing python code in an environment where the lookup function for locals has been trained to handle your custom descriptor protocol.<br>

<br><br></blockquote><div><br></div><div>I just signed up for python-ideas a month or two ago, how many awesome(ly dangerous) hacks like this have I missed over the years? </div></div><br><div>About-to-eval-away-the-next-six-months-ly yours,</div>
<div>Don</div>