New submission from Guido Imperiale <crusade...@gmail.com>:

(1)
In the documentation for loads(), the name for the first argument of loads is 
'bytes_object'. The actual signature, both in pickle.py and _pickle.c, it is 
instead 'data'.

(2)
In the documentation and in pickle.py, the default value for the 'buffers' 
parameter is None. However, in _pickle.c, it is an empty tuple (); this is also 
reflected by running the interpreter:

In [1]: inspect.signature(pickle.loads).parameters['buffers']                   
                                                                                
                                                                                
                 
Out[1]: <Parameter "buffers=()">

Thanks to @hauntsaninja for spotting these in 
https://github.com/python/typeshed/pull/3636

----------
assignee: docs@python
components: Documentation, Library (Lib)
messages: 360569
nosy: crusaderky, docs@python
priority: normal
severity: normal
status: open
title: pickle: inconsistent arguments pickle.py vs _pickle.c vs docs
versions: Python 3.8

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

Reply via email to