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 Dan Rose, martin.panter, rhettinger, serhiy.storchaka
Date 2019-05-25.16:48:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1558802882.8.0.814699082128.issue37040@roundup.psfhosted.org>
In-reply-to
Content
Adding the __contains__() method to the count iterator would not solve the general problem with infinite iterators. For example with the following expressions:

    -1 in filter(None, itertools.count())
    -1 in map(float, itertools.count())

It is not worth to add a method just to handle a single case of misusing. You should not use "in" with infinite iterators.
History
Date User Action Args
2019-05-25 16:48:02serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, martin.panter, Dan Rose
2019-05-25 16:48:02serhiy.storchakasetmessageid: <1558802882.8.0.814699082128.issue37040@roundup.psfhosted.org>
2019-05-25 16:48:02serhiy.storchakalinkissue37040 messages
2019-05-25 16:48:02serhiy.storchakacreate