[issue9214] Most Set methods of KeysView and ItemsView do not work right

2010-08-22 Thread Raymond Hettinger
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

[issue9214] Most Set methods of KeysView and ItemsView do not work right

2010-08-20 Thread Daniel Stutzbach
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

[issue9214] Most Set methods of KeysView and ItemsView do not work right

2010-07-31 Thread Daniel Urban
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. --

[issue9214] Most Set methods of KeysView and ItemsView do not work right

2010-07-30 Thread Eli Bendersky
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

[issue9214] Most Set methods of KeysView and ItemsView do not work right

2010-07-29 Thread Daniel Urban
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.

[issue9214] Most Set methods of KeysView and ItemsView do not work right

2010-07-25 Thread Eli Bendersky
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

[issue9214] Most Set methods of KeysView and ItemsView do not work right

2010-07-16 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9214 ___ ___ Python-bugs-list

[issue9214] Most Set methods of KeysView and ItemsView do not work right

2010-07-10 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9214 ___ ___ Python-bugs-list

[issue9214] Most Set methods of KeysView and ItemsView do not work right

2010-07-10 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +merwok ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9214 ___ ___ Python-bugs-list mailing

[issue9214] Most Set methods of KeysView and ItemsView do not work right

2010-07-09 Thread Daniel Stutzbach
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'}

[issue9214] Most Set methods of KeysView and ItemsView do not work right

2010-07-09 Thread Daniel Stutzbach
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))

[issue9214] Most Set methods of KeysView and ItemsView do not work right

2010-07-09 Thread Daniel Stutzbach
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

[issue9214] Most Set methods of KeysView and ItemsView do not work right

2010-07-09 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9214 ___ ___

[issue9214] Most Set methods of KeysView and ItemsView do not work right

2010-07-09 Thread Raymond Hettinger
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