[Python-Dev] PEP 469: Restoring the iterkeys/values/items() methods
Cameron Simpson
cs at zip.com.au
Mon Apr 21 05:50:28 CEST 2014
More information about the Python-Dev mailing list
Mon Apr 21 05:50:28 CEST 2014
- Previous message: [Python-Dev] PEP 469: Restoring the iterkeys/values/items() methods
- Next message: [Python-Dev] PEP 466 (round 2): Network security enhancements for Python 2.7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 20Apr2014 20:12, Devin Jeanpierre <jeanpierreda at gmail.com> wrote: >On Sun, Apr 20, 2014 at 8:01 PM, Cameron Simpson <cs at zip.com.au> wrote: >> Me too. I'm against iteritems and friends coming back. >> I've been burned in the past with the burden of writing a mapping class with >> the many methods such a thing must support; both items() and iteritems() and >> so forth. [...] > >As far as I know, all you have to implement yourself, to support the >dict-like interface, are: > > - __getitem__ > - __setitem__ > - __delitem__ > - __iter__ > - __len__ > >MutableMapping can implement the rest. This wouldn't change with the >re-addition of the iter* methods. > >You really have to use MutableMapping now that keys/items/values are >complicated objects: it's much harder to implement dict-like objects >from scratch in 3.x than 2.x. Fair point. Thank you, Cameron Simpson <cs at zip.com.au> Draw little boxes with arrows. It helps. - Michael J. Eager
- Previous message: [Python-Dev] PEP 469: Restoring the iterkeys/values/items() methods
- Next message: [Python-Dev] PEP 466 (round 2): Network security enhancements for Python 2.7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list