SilentGhost <ghost....@runbox.com> added the comment:
This seem like a misdirected expectation. count returns a regular iterator and the purpose behind it is not to enable membership checks, this only works because it's a regular iterators and normal rules for checking membership are applied. In any case, it is possible to write an infinite loop in Python either by accident or intentionally, this doesn't seem like a reasonable rationale for making this sort changes. ---------- nosy: +SilentGhost, rhettinger resolution: -> rejected stage: -> resolved status: open -> closed type: -> behavior versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37040> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com