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 Kevin Shweh
Recipients Kevin Shweh
Date 2021-12-15.16:48:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1639586880.61.0.695571105446.issue46085@roundup.psfhosted.org>
In-reply-to
Content
The OrderedDict iterator caches a di_result tuple for use with iter(od.items()). It's *supposed* to only do that for the items() case, but the code does

    if (kind & (_odict_ITER_KEYS | _odict_ITER_VALUES))

to test for this case. This is the wrong test. It should be

    if ((kind & _odict_ITER_KEYS) && (kind &_odict_ITER_VALUES))

The current test allocates di_result for key and value iterators as well as items iterators.
History
Date User Action Args
2021-12-15 16:48:00Kevin Shwehsetrecipients: + Kevin Shweh
2021-12-15 16:48:00Kevin Shwehsetmessageid: <1639586880.61.0.695571105446.issue46085@roundup.psfhosted.org>
2021-12-15 16:48:00Kevin Shwehlinkissue46085 messages
2021-12-15 16:48:00Kevin Shwehcreate