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

2010-05-06 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net 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 rep...@bugs.python.org

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

2010-05-05 Thread A.M. Kuchling
A.M. Kuchling li...@amk.ca 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 =

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

2010-05-05 Thread A.M. Kuchling
A.M. Kuchling li...@amk.ca added the comment: The fix is easy, I think; just add Py_TPFLAGS_CHECKTYPES to the PyDictValues_Type's definition. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8404

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

2010-05-05 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net 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

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

2010-05-05 Thread A.M. Kuchling
A.M. Kuchling li...@amk.ca added the comment: Ah, of course! It didn't occur to me that .values() isn't necessarily a set. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8404 ___

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

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

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

2010-04-29 Thread Alexander Belopolsky
Alexander Belopolsky alexander.belopol...@gmail.com 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:

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

2010-04-27 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8404 ___ ___

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

2010-04-17 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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:

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

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

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

2010-04-14 Thread A.M. Kuchling
New submission from A.M. Kuchling li...@amk.ca: 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

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

2010-04-14 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8404 ___

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

2010-04-14 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8404 ___ ___ Python-bugs-list mailing

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

2010-04-14 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

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

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