<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#330033" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 1/3/2018 11:16 AM, Guido van Rossum
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAP7+vJJoKU-62WEeCk11dBU4A43WVZk6BjL6dLmg_n1_bcEE_g@mail.gmail.com">
<div>Maybe I should clarify again what run() does. Here's how I
think of it in pseudo code:</div>
<div><br>
</div>
<div>def run(self, func, *args, **kwds):</div>
<div> old = _get_current_context()</div>
<div> new = old.copy()</div>
<div> _set_current_context(new)</div>
<div> try:</div>
<div> return func(*args, **kwds)</div>
<div> finally:</div>
<div> _set_current_context(old)</div>
<div><br>
</div>
</blockquote>
</lurking><br>
<br>
I find it interesting that self isn't used in the above pseudo-code.
I thought that Context.run() would run the function in the "context"
of self, not in the context of a copy of "current context".<br>
<br>
</lurking><br>
</body>
</html>