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
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 =
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
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
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
___
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
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:
Changes by Terry J. Reedy tjre...@udel.edu:
--
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8404
___
___
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:
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
___
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
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
___
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
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
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
15 matches
Mail list logo