Author aliles
Recipients aliles, daniel.urban, eric.araujo, ezio.melotti, flox, jcea, meador.inge, ncoghlan, rhettinger
Date 2013-07-16.12:49:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373978965.24.0.313195413339.issue13266@psf.upfronthosting.co.za>
In-reply-to
Content
My +1 is for the callback based approach. The brevity of the search loop for finding the innermost function is (in my opinion at least) non-obvious, relying on for loops not having their own scope as it does.

If a generator based API was adopted instead, I propose a convenience function (unwrap_all?) to help developers avoid writing code like:

    inner = None
    for inner in functools.unwrap(outer):
        pass
    if inner is None:
        inner = outer

Which combines a misunderstanding of the API with for loop scope shortcut.
History
Date User Action Args
2013-07-16 12:49:25alilessetrecipients: + aliles, rhettinger, jcea, ncoghlan, ezio.melotti, eric.araujo, flox, meador.inge, daniel.urban
2013-07-16 12:49:25alilessetmessageid: <1373978965.24.0.313195413339.issue13266@psf.upfronthosting.co.za>
2013-07-16 12:49:25alileslinkissue13266 messages
2013-07-16 12:49:24alilescreate