New submission from Raymond Hettinger:

The help() for collections.OrderedDict.popitem is not showing the default value 
of last=True.

----------- Prior versions are unhelpful ------------------
~/npython $ python3.6
Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import OrderedDict
>>> help(OrderedDict.popitem)
Help on method_descriptor:

popitem(...)
    od.popitem() -> (k, v), return and remove a (key, value) pair.
    Pairs are returned in LIFO order if last is true or FIFO order if false.


----------- Current version is helpful --------------------
$ ./python.exe
Python 3.7.0a0 (heads/master-dirty:b2d096bd2a, Sep  4 2017, 14:50:05)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import OrderedDict
>>> help(OrderedDict.popitem)
Help on method_descriptor:

popitem(self, /, last=True)
    Remove and return a (key, value) pair from the dictionary.

    Pairs are returned in LIFO order if last is true or FIFO order if false.

----------
messages: 301280
nosy: eric.snow, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Backport docstring improvements to the C version of OrderedDict
type: enhancement
versions: Python 3.5, Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31345>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to