Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Fixed in r84252, r84252, and r84254.
--
priority: high - normal
resolution: accepted - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
The patch looks good to me, too. The new tests fail without the fix, and pass
with the fix.
--
assignee: stutzbach - rhettinger
stage: unit test needed - patch review
___
Python
Daniel Urban urban.dani...@gmail.com added the comment:
P.S. Please let me know how to detect such issues in future patches.
In some editors there is an option Remove trailing spaces or something like
that. Also, some editors (for example Kate) show trailing spaces.
--
Eli Bendersky eli...@gmail.com added the comment:
Attaching an updated patch, with the trailing whitespace removed. Hope it's
more acceptable now.
P.S. Please let me know how to detect such issues in future patches.
--
Added file: http://bugs.python.org/file18267/issue9214.2.patch
Daniel Urban urban.dani...@gmail.com added the comment:
The patch applies cleanly to the py3k branch (r83238). The unittests pass.
The code looks good to me (it does exactly what was described as the solution).
There are some trailing whitespace on some lines, that will need to be deleted.
Eli Bendersky eli...@gmail.com added the comment:
Hello,
I'm attaching a patch for this issue.
1. _from_iterable in KeysView and ItemsView overridden as per Daniel's
suggestion (Lib/_abcoll.py)
2. Added a test case to Lib/test/test_collections.py that uses this test case
(creates the
Changes by Eli Bendersky eli...@gmail.com:
--
nosy: +eli.bendersky
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9214
___
___
Python-bugs-list
Changes by Éric Araujo mer...@netwok.org:
--
resolution: - accepted
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9214
___
___
Python-bugs-list
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +merwok
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9214
___
___
Python-bugs-list mailing
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com:
Attached is a simple Python 3 example script that defines a minimalist
MutableMapping that simply wraps a dict, followed by:
x = MySimpleMapping(red=5)
y = x.keys()
z = x.keys() | {'orange'}
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
Oops. Somehow deleted a linefeed in there. The example should read:
x = MySimpleMapping(red=5)
y = x.keys()
z = x.keys() | {'orange'}
x['blue'] = 7
print(list(z))
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
I guess roundup is deleting my linefeed? I'm sure I didn't do it that time.
I'm not sure what's going on there, but the x['blue'] = 7 should be on a line
by itself.
--
___
Python
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9214
___
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
To solve the problem, KeysView and ItemsView need
to override _from_iterable to return a set instead
of a new view.
Thanks for the good analysis and suggested fix. I believe both are correct and
they match the behavior
14 matches
Mail list logo