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 serhiy.storchaka
Recipients arhadthedev, serhiy.storchaka, sobolevn
Date 2021-11-04.10:50:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1636023016.73.0.148886977765.issue45672@roundup.psfhosted.org>
In-reply-to
Content
The tests are passed because this modification does not affect behavior, it just makes the code slightly less efficient. Replacing i+1 with i just adds one iteration:

    b = bases[i]  # == self
    if isinstance(b, _BaseGenericAlias) and b is not self:
        return ()

Since b is self, the condition is always false.

It is impossible to catch this change in tests because both codes are equivalent.
History
Date User Action Args
2021-11-04 10:50:16serhiy.storchakasetrecipients: + serhiy.storchaka, sobolevn, arhadthedev
2021-11-04 10:50:16serhiy.storchakasetmessageid: <1636023016.73.0.148886977765.issue45672@roundup.psfhosted.org>
2021-11-04 10:50:16serhiy.storchakalinkissue45672 messages
2021-11-04 10:50:16serhiy.storchakacreate