Message366040
update 2:
This affects ALL functions which exhaust a generator expression. If that generator expression makes a recursive call, then the cost of evaluating it is O(depth), when it should be only O(1).
You can see demonstrate that this doesn't just affect builtins, by replacing max() with a custom implementation such as,
def custommax(it):
best = -9999999
for x in it:
if x > best:
best = x
return best |
|
Date |
User |
Action |
Args |
2020-04-09 11:15:03 | brendon-zhang@hotmail.com | set | recipients:
+ brendon-zhang@hotmail.com |
2020-04-09 11:15:03 | brendon-zhang@hotmail.com | set | messageid: <1586430903.81.0.547247714006.issue40225@roundup.psfhosted.org> |
2020-04-09 11:15:03 | brendon-zhang@hotmail.com | link | issue40225 messages |
2020-04-09 11:15:03 | brendon-zhang@hotmail.com | create | |
|