New submission from Dan Rose <daniel.buch...@gmail.com>:

Checking membership in `itertools.count()` will either return True in linear 
time or enter an infinite loop that cannot be terminated with Ctrl-c. This

```
import itertools
1 in itertools.count(0,2)
```

It is expected that the above code will use an efficient (O(1)) membership 
algorithm like range objects.

----------
components: Library (Lib)
messages: 343452
nosy: Dan Rose
priority: normal
severity: normal
status: open
title: checking for membership in itertools.count enters infinite loop with no 
way to exit
versions: 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

Reply via email to