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 mark.dickinson
Recipients brandtbucher, mark.dickinson, rhettinger
Date 2022-01-13.08:53:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642064004.96.0.772825780838.issue46361@roundup.psfhosted.org>
In-reply-to
Content
And there are some similar things going on in rangeobject.c.

https://github.com/python/cpython/blob/1de60155d5d01be2924e72fb68dd13d4fd00acd7/Objects/rangeobject.c#L598

        if (r->step == _PyLong_GetOne()) {
            return idx;
        }

Again, technically "okay", since it's only a fast path and the slow path that follows will still do the right thing with a 1 that's not "the" 1, but it feels fragile.
History
Date User Action Args
2022-01-13 08:53:25mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, brandtbucher
2022-01-13 08:53:24mark.dickinsonsetmessageid: <1642064004.96.0.772825780838.issue46361@roundup.psfhosted.org>
2022-01-13 08:53:24mark.dickinsonlinkissue46361 messages
2022-01-13 08:53:24mark.dickinsoncreate