[New-bugs-announce] [issue30100] WeakSet should all discard and remove on items that can have weak references

donkopotamus report at bugs.python.org
Wed Apr 19 01:20:30 EDT 2017


New submission from donkopotamus:

Currently WeakSet().discard([]) will raise a TypeError as we cannot take a weak reference to a list.

However, that means a list can never be in a WeakSet, so WeakSet().discard([]) could instead be a no-op.  Similarly WeakSet().remove([]) could be a KeyError.

----------
messages: 291861
nosy: donkopotamus
priority: normal
pull_requests: 1304
severity: normal
status: open
title: WeakSet should all discard and remove on items that can have weak references

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30100>
_______________________________________


More information about the New-bugs-announce mailing list