[New-bugs-announce] [issue12330] Named set methods on collections.Set and dict view objects
report at bugs.python.org
Tue Jun 14 01:28:20 CEST 2011
New submission from Julian <Julian+Python.org at GrayVines.com>:
collections.Set / collections.MutableSet do not provide any of the named set methods, nor do dict view objects (neither as viewkeys and friends create them nor in py3). They obviously implement the operator methods correctly, but besides the fact that they're not fully implementing the set API, .union, .difference, and .intersection, for example, take *args to do arbitrary unions / difference / intersections, so there's at least one functionality gap too (nothing a for loop can't fix but, yeah). I've attached a very quick example diff'ing the methods which I ran on 2.7 and 3.2.
In searching around for a reason, or at least some documentation or acknowledgement that this is intentional, I see there's an offhand comment on Issue7771 (I apologize in advance if this didn't deserve its own ticket then). Issue9212 was accepted as "an oversight" and is related, so I hope that it's worth the clarification as to whether 1. we (you :) are planning / willing to do this fix on 2.7, or 3.2, or 2. if this is desired for some reason, in which case consider this simply a documentation request and perhaps a dupe of 7771 then.
Now that I've been long winded thanks for your time :).
components: Library (Lib)
title: Named set methods on collections.Set and dict view objects
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file22358/namedmeths.py
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce