[New-bugs-announce] [issue39590] collections.deque.__contains__ and .count should hold strong references.
Dennis Sweeney
report at bugs.python.org
Sun Feb 9 00:02:53 EST 2020
New submission from Dennis Sweeney <sweeney.dennis650 at gmail.com>:
Similar to https://bugs.python.org/issue39453, but with deques:
Python 3.9.0a3+:
>>> from collections import deque
>>> class A:
... def __eq__(self, other):
... L.clear()
... return NotImplemented
...
>>> L = [A(), A(), A()]
>>> 17 in L
False
>>> L = deque([A(), A(), A()])
>>> 17 in L
(Crashes with "Unhandled exception thrown: read access violation.")
----------
components: Library (Lib)
messages: 361642
nosy: Dennis Sweeney
priority: normal
severity: normal
status: open
title: collections.deque.__contains__ and .count should hold strong references.
type: crash
versions: Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39590>
_______________________________________
More information about the New-bugs-announce
mailing list