New submission from Julian <julian+python....@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)
files: namedmeths.py
messages: 138286
nosy: Julian
priority: normal
severity: normal
status: open
title: Named set methods on collections.Set and dict view objects
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file22358/namedmeths.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12330>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to