PEP 455: add BDFL-Delegate and fix some minor typos.

This commit is contained in:
gbrandl 2013-10-08 15:40:45 +02:00
parent 5efee1848e
commit 1e063f7102
1 changed files with 7 additions and 5 deletions

View File

@ -3,6 +3,7 @@ Title: Adding a key-transforming dictionary to collections
Version: $Revision$
Last-Modified: $Date$
Author: Antoine Pitrou <solipsis@pitrou.net>
BDFL-Delegate: Raymond Hettinger
Status: Draft
Type: Standards Track
Content-Type: text/x-rst
@ -40,15 +41,15 @@ function is applied to keys when looking them up: that function being
``str.lower`` or ``str.casefold`` in the former example and the built-in
``id`` function in the latter.
(it could be said that the pattern *projects* keys from the user-visible
set onto the internal lookup set)
(It could be said that the pattern *projects* keys from the user-visible
set onto the internal lookup set.)
Semantics
=========
TransformDict is a ``MutableMapping`` implementation: it faithfully
implements the well-known API of mutable mappings, as ``dict`` itself
implements the well-known API of mutable mappings, like ``dict`` itself
and other dict-like classes in the standard library. Therefore, this PEP
won't rehash the semantics of most TransformDict methods.
@ -83,7 +84,7 @@ function returns a hashable one::
Constructor
-----------
As shown in the example aboves, creating a TransformDict requires passing
As shown in the examples above, creating a TransformDict requires passing
the key transformation function as the first argument (much like creating
a ``defaultdict`` requires passing the factory function as first argument).
@ -110,7 +111,7 @@ together with the corresponding value::
File "<stdin>", line 1, in <module>
KeyError: 'bar'
The method name ``getitem()`` mirrors the standard ``popitem()`` method
The method name ``getitem()`` follows the standard ``popitem()`` method
on mutable mappings.
Getting the transformation function
@ -263,6 +264,7 @@ Copyright
This document has been placed in the public domain.
..
Local Variables:
mode: indented-text