-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pickle: inconsistent arguments pickle.py vs _pickle.c vs docs #83616
Comments
(1) (2) In [1]: inspect.signature(pickle.loads).parameters['buffers'] Thanks to @hauntsaninja for spotting these in python/typeshed#3636 |
As mentioned on the attached PR, the first argument is positional, so it doesn't matter that the name in the docs is not the same as the name in the code. The name "bytes_object" makes it clear which type of object is accepted, which makes it a better fit IMHO than "data". Therefore, I'm going to close this issue. |
Reopening because it seems my reading of the doc was wrong (took a backslash for a regular slash :-o). |
In pickle.py the name of the first parameter is "s" (it was "str" in 2.7), not "data". And in the module docstring it is "string". So we have two options:
What is more preferable? Do we need to pass the first argument to pickle.loads() by keyword? After resolving this issue we may want to revise other modules which have the loads() function. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: