[Python-3000] PEP 3106: Revamping dict.keys(), .values() and .items()

Brett Cannon brett at python.org
Wed Dec 20 23:11:25 CET 2006


On 12/19/06, Guido van Rossum <guido at python.org> wrote:
>
> I've written a quick version of PEP 3106, which expresses my ideas
> about how the dict methods to access keys, values and items should be
> redone.
>
> The text is in svn:
> http://svn.python.org/view/peps/trunk/pep-3106.txt?rev=53096&view=markup
>
> At some point it will appear on python.org:
> http://python.org/dev/peps/pep-3106/
>
> Comments please? (Or we can skip the comments and go straight to the
> implementation stage. Patch anyone?)


To comment on the open issues, I don't see why they can't be exposed and be
subclassable.  Couldn't they go in the collections module?  And as for
subclassing, I don't see how that would hurt anything.

As for the names, could go with MappingKeysView or something.  It's wordy,
but you know what the classes are by name alone.  Otherwise I would go with
dict_keys or something so that the repr of these things is makes it easy to
know what they are.

-Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20061220/d203c0b4/attachment.htm 


More information about the Python-3000 mailing list