# Bug report ### Bug description: Follow up of #119780. Quick fix is to add raise statement: https://github.com/python/cpython/pull/119781/commits/7f9b4d0c1cdaabfa9aec01ef9856793f328c0359 But it was suggested to do refactoring of this function instead. ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-135452 <!-- /gh-linked-prs -->