Message193165
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. |
|
Date |
User |
Action |
Args |
2013-07-16 12:49:25 | aliles | set | recipients:
+ aliles, rhettinger, jcea, ncoghlan, ezio.melotti, eric.araujo, flox, meador.inge, daniel.urban |
2013-07-16 12:49:25 | aliles | set | messageid: <1373978965.24.0.313195413339.issue13266@psf.upfronthosting.co.za> |
2013-07-16 12:49:25 | aliles | link | issue13266 messages |
2013-07-16 12:49:24 | aliles | create | |
|