[issue8404] Set operations don't work for dictionary views

2010-05-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, this agrees with the specs in _abcoll which show KeysView and ItemsView as sets but not ValuesView. -- nosy: +rhettinger ___ Python tracker __

[issue8404] Set operations don't work for dictionary views

2010-05-05 Thread A.M. Kuchling
A.M. Kuchling added the comment: Ah, of course! It didn't occur to me that .values() isn't necessarily a set. -- ___ Python tracker ___ _

[issue8404] Set operations don't work for dictionary views

2010-05-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Why do you expect dict_values to support set operations? Dict values unlike keys are not sets, they are more like lists. Set operations of dict_values are not supported in 3.x either. -- nosy: +belopolsky -Alexander.Belopolsky ___

[issue8404] Set operations don't work for dictionary views

2010-05-05 Thread A.M. Kuchling
A.M. Kuchling added the comment: The fix is easy, I think; just add Py_TPFLAGS_CHECKTYPES to the PyDictValues_Type's definition. -- ___ Python tracker ___ __

[issue8404] Set operations don't work for dictionary views

2010-05-05 Thread A.M. Kuchling
A.M. Kuchling added the comment: (commenting on a closed bug, because I'm not sure it should be re-opened) While coming up with examples, I found a weird inconsistency. Was it intentional for viewkeys() and viewitems() to support set operations, but not viewvalues()? >>> d1 = dict((i*10, c

[issue8404] Set operations don't work for dictionary views

2010-05-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r80749 and r80751 (for py3k). Thank you! -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue8404] Set operations don't work for dictionary views

2010-04-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The patch looks fine. I verified that the new tests pass on trunk and py3k. I am attaching a patch for py3k with a forward port of set opereations and repr tests. -- nosy: +Alexander.Belopolsky Added file: http://bugs.python.org/file17127/issu

[issue8404] Set operations don't work for dictionary views

2010-04-27 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8404] Set operations don't work for dictionary views

2010-04-17 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file16927/fix_dictviews_as_number.diff ___ Python tracker ___ ___ Python

[issue8404] Set operations don't work for dictionary views

2010-04-17 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I found the issue. The view types didn't have Py_TPFLAGS_CHECKTYPES set, so the types were using the old-style binary operators. Here's a patch that fixes the issue. Please review. -- Added file: http://bugs.python.org/file16966/fix_dictviews_se

[issue8404] Set operations don't work for dictionary views

2010-04-14 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- keywords: +patch Added file: http://bugs.python.org/file16927/fix_dictviews_as_number.diff ___ Python tracker ___

[issue8404] Set operations don't work for dictionary views

2010-04-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: It is a bug. First, the dictviews_as_number is broken; the field for classic division was removed in 3.x, so everything is shifted by one. I included a patch to fix this. Unfortunately, this isn't enough to fix the issue. There seems to be some overly

[issue8404] Set operations don't work for dictionary views

2010-04-14 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue8404] Set operations don't work for dictionary views

2010-04-14 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue8404] Set operations don't work for dictionary views

2010-04-14 Thread A.M. Kuchling
New submission from A.M. Kuchling : The examples of set operations in http://docs.python.org/dev/library/stdtypes#dictionary-view-objects don't work in the current 2.7 trunk: -> ./python.exe Python 2.7b1+ (trunk:80084:80085M, Apr 14 2010, 21:17:06) [GCC 4.0.1 (Apple Inc. build 5465)] on darwi