[Python-ideas] How can I get own instance of generator in itself code
Eric Snow
ericsnowcurrently at gmail.com
Tue Jul 24 02:59:21 CEST 2012
On Mon, Jul 16, 2012 at 10:28 AM, Eric Snow <ericsnowcurrently at gmail.com> wrote:
> Yeah, this is still valuable. However, at this point it would be a 3.4
> addition (_if_ it gets committed). Updating the patch in the tracker is on
> my todo for the next few months.
FWIW, the possibility of exposing something like __function__ in the
function locals is less likely to garner support than the initial
f_func approach. Said Guido[1]:
<quote>
If it were expected that people would start writing recursive
calls using __function__ routinely, in situations where a name
reference works, I'd be very unhappy with the new feature. (And if
someone wants to make the argument that recursive calls using
__function__ are actually better in some way I am willing to
filibuster.)
</quote>
So there's a metric that f_func passes much more readily. That said,
the f_func patch would also make "__function__" easier to implement if
that feature passed muster.
-eric
[1] http://mail.python.org/pipermail/python-ideas/2011-August/011062.html
More information about the Python-ideas
mailing list