[issue45672] Mutation tests results of typing.py

Serhiy Storchaka report at bugs.python.org
Thu Nov 4 06:50:16 EDT 2021


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

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.

----------
resolution:  -> not a bug

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45672>
_______________________________________


More information about the Python-bugs-list mailing list