Clarify surjectivity, for diversity's sake (not the mailing-list, though)

This commit is contained in:
Antoine Pitrou 2013-09-14 03:37:52 +02:00
parent 0aedc93c61
commit 409b8134ad
1 changed files with 2 additions and 1 deletions

View File

@ -53,7 +53,8 @@ and other dict-like classes in the standard library. Therefore, this PEP
won't rehash the semantics of most TransformDict methods.
The transformation function needn't be bijective, it can be strictly
surjective as in the case-insensitive example::
surjective as in the case-insensitive example (in other words, different
keys can lookup the same value)::
>>> d = TransformDict(str.casefold)
>>> d['SomeKey'] = 5