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 arigo
Recipients arigo
Date 2017-05-11.21:10:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1494537021.49.0.31945650773.issue30347@psf.upfronthosting.co.za>
In-reply-to
Content
This triggers an assert() failure on debug-mode Python (or a leak in release Python):

from itertools import groupby

def f(n):
    print("enter:", n)
    if n == 5:
        list(b)
    print("leave:", n)
    return n != 6

for (k, b) in groupby(range(10), f):
    print(list(b))

With current trunk we get: python: ./Modules/itertoolsmodule.c:303: _grouper_next: Assertion `gbo->currkey == NULL' failed.
History
Date User Action Args
2017-05-11 21:10:21arigosetrecipients: + arigo
2017-05-11 21:10:21arigosetmessageid: <1494537021.49.0.31945650773.issue30347@psf.upfronthosting.co.za>
2017-05-11 21:10:21arigolinkissue30347 messages
2017-05-11 21:10:21arigocreate