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.

Title: set.add and set.discard are not conformant to collections.MutableSet interface
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.0, Python 3.1, Python 2.7, Python 2.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: benjamin.peterson, georg.brandl, jrosiek, rhettinger
Priority: normal Keywords: 26backport

Created on 2009-01-12 11:23 by jrosiek, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg79665 - (view) Author: Jaroslaw Rosiek (jrosiek) Date: 2009-01-12 11:23
Methods set.add and set.discard should return boolean values according
to collections.MutableSet but they are not.

>>> print set().add(5)
>>> print set().discard(5)
msg79725 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2009-01-13 09:09
The comments were incorrect.
Mutating methods always return None.
Fixed in r68570.
Needs to be ported to 2.6, 3.0, and 3.1.
msg79931 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-01-16 04:14
Ported to py3k in r68630 and 3.0 in r68631.
Date User Action Args
2022-04-11 14:56:44adminsetgithub: 49172
2009-01-19 22:23:04georg.brandlsetstatus: open -> closed
2009-01-16 04:14:26benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg79931
2009-01-13 09:09:51rhettingersetversions: + Python 3.0, Python 3.1, Python 2.7
nosy: + georg.brandl
messages: + msg79725
assignee: rhettinger -> georg.brandl
keywords: + 26backport
resolution: fixed
2009-01-13 08:12:55georg.brandlsetassignee: rhettinger
nosy: + rhettinger
2009-01-12 11:23:59jrosiekcreate