diff options
author | Brett Cannon <brett@python.org> | 2014-10-03 14:13:36 -0400 |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2014-10-03 14:13:36 -0400 |
commit | 4711b7ae8befb52017ed5abdd272f6e5eff61606 (patch) | |
tree | 629a959ab488856ad9de1be04e0326aa2762be28 /documentation | |
parent | 61e0bcdf6f57d77c7315a9d801b912359a71eb9a (diff) | |
download | six-4711b7ae8befb52017ed5abdd272f6e5eff61606.tar.gz |
Introduce viewkeys(), viewvalues(), and viewitems().
Closes issue #92
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/index.rst | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/documentation/index.rst b/documentation/index.rst index 0adadc2..594976b 100644 --- a/documentation/index.rst +++ b/documentation/index.rst @@ -203,6 +203,27 @@ functions and methods is the stdlib :mod:`py3:inspect` module. *kwargs* are passed through to the underlying method. +.. function:: viewkeys(dictionary, **kwargs) + + Returns a view over *dictionary*\'s keys. This replaces + ``dictionary.viewkeys()`` on Python 2.7 and ``dictionary.keys()`` on + Python 3. *kwargs* are passed through to the underlying method. + + +.. function:: viewvalues(dictionary, **kwargs) + + Returns a view over *dictionary*\'s values. This replaces + ``dictionary.viewvalues()`` on Python 2.7 and ``dictionary.values()`` on + Python 3. *kwargs* are passed through to the underlying method. + + +.. function:: viewitems(dictionary, **kwargs) + + Returns a view over *dictionary*\'s items. This replaces + ``dictionary.viewitems()`` on Python 2.7 and ``dictionary.items()`` on + Python 3. *kwargs* are passed through to the underlying method. + + .. function:: create_bound_method(func, obj) Return a method object wrapping *func* and bound to *obj*. On both Python 2 |