[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-21 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Here is a revised patch based on Benjamin's comments on Rietveld. -- Added file: http://bugs.python.org/file17433/mapping2.patch ___ Python tracker rep...@bugs.python.org

[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-21 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r81414. Thanks for the patch. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8729

[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-19 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Will you post to Rietveld, please? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8729 ___

[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-19 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Done: http://codereview.appspot.com/1193044 This is my first time using Rietveld. Let me know if I've done anything wrong. -- ___ Python tracker rep...@bugs.python.org

[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-18 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Backport to 2.6 and 3.1? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8729 ___

[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Yes, I think this is a good candidate for backport. The ABCs are new and their APIs shouldn't contain any obvious bugs such as this. -- nosy: +pitrou versions: +Python 2.6, Python 3.1 ___ Python

[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-18 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Here's a patch that adds test cases. It exercises all of the following special methods on Set and Mapping to ensure that they return NotImplemented if they don't recognize the other type. lt, gt, le, ge, eq, ne, or, and,

[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-17 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8729 ___ ___ Python-bugs-list mailing

[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-15 Thread Daniel Stutzbach
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com: The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping, to give the other type a chance at the comparison. Right now it simply returns false. The comparison methods on the other

[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-15 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: A test would be good. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8729 ___

[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-15 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Will do, sometime this week. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8729 ___