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 rhettinger
Recipients rhettinger, serhiy.storchaka, tim.peters
Date 2020-12-28.23:51:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1609199500.0.0.590349255372.issue42772@roundup.psfhosted.org>
In-reply-to
Content
> Should I restore that optimization in issue37319?

Yes, but to fix the bug it needs to occur earlier in the code (currently line 314):

    if stop is None and step is _ONE: <-- Line 314
                   ^^^^^^^^^^^^^^^^^  <-- Add this   

And again later:
         if istep == 1 and width > 0:   <-- Line 348
                     ^-- change to _ONE

As a standalone optimization, it wasn't worth it, but as a way to fix the bug without a regression, it is reasonable.
History
Date User Action Args
2020-12-28 23:51:40rhettingersetrecipients: + rhettinger, tim.peters, serhiy.storchaka
2020-12-28 23:51:39rhettingersetmessageid: <1609199500.0.0.590349255372.issue42772@roundup.psfhosted.org>
2020-12-28 23:51:39rhettingerlinkissue42772 messages
2020-12-28 23:51:39rhettingercreate