This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brendon-zhang@hotmail.com
Recipients brendon-zhang@hotmail.com
Date 2020-04-09.11:15:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1586430903.81.0.547247714006.issue40225@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-04-09 11:15:03brendon-zhang@hotmail.comsetrecipients: + brendon-zhang@hotmail.com
2020-04-09 11:15:03brendon-zhang@hotmail.comsetmessageid: <1586430903.81.0.547247714006.issue40225@roundup.psfhosted.org>
2020-04-09 11:15:03brendon-zhang@hotmail.comlinkissue40225 messages
2020-04-09 11:15:03brendon-zhang@hotmail.comcreate