[issue28912] collections.abc.OrderedMapping

2016-12-21 Thread Joshua Bronson
Joshua Bronson added the comment: For the record, it looks like Victor Stinner suggested doing this in https://mail.python.org/pipermail/python-dev/2016-September/146349.html Brett Cannon replied in https://mail.python.org/pipermail/python-dev/2016-September/146350.html to suggest adding

[issue28912] collections.abc.OrderedMapping

2016-12-10 Thread Joshua Bronson
Joshua Bronson added the comment: Sorry to hear but thanks for the consideration. To follow up on your comments: > nice to see Guido's reasons for giving a -0 on the proposal. (Guido was giving his -0 on a proposal for collections.abc.Ordered, whereas the main proposal here is

[issue28912] collections.abc.OrderedMapping

2016-12-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you for the link, it was nice to see Guido's reasons for giving a -0 on the proposal. I would add that I haven't see any code in the wild that would benefit from testing isinstance(m, OrderedMapping) and taking some different action depending on the

[issue28912] collections.abc.OrderedMapping

2016-12-09 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___

[issue28912] collections.abc.OrderedMapping

2016-12-09 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue28912] collections.abc.OrderedMapping

2016-12-08 Thread Joshua Bronson
Joshua Bronson added the comment: I only just found the "[Python-ideas] Adding collections.abc.Ordered" thread at https://mail.python.org/pipermail/python-ideas/2015-November/037146.html - sorry for not seeing it sooner. Looking forward to catching up on what I missed. --

[issue28912] collections.abc.OrderedMapping

2016-12-08 Thread Joshua Bronson
Joshua Bronson added the comment: Come to think of it, to be exact, rather than extending Reversible, OrderedMapping could extend a narrower interface, something like collections.abc.Ordered, along with extending Mapping. (Reversible implies Ordered, but Ordered does not imply Reversible: a

[issue28912] collections.abc.OrderedMapping

2016-12-08 Thread Joshua Bronson
Joshua Bronson added the comment: This patch improves the OrderedMapping.__eq__ implementation to be more generic in the case that ``other`` is an unordered Mapping of the same length as ``self``. -- Added file: http://bugs.python.org/file45805/jab-orderedmapping-2.patch

[issue28912] collections.abc.OrderedMapping

2016-12-08 Thread Joshua Bronson
New submission from Joshua Bronson: Since code can be clearer than prose, I just sketched this idea out in the attached patch. Please take a look at it as a minimum demonstration of the concept. Rationale: The Python standard library provides collections.OrderedDict, along with several ABCs