This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年03月02日 08:46 by peter.otten, last changed 2022年04月11日 14:57 by admin.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| copyreg.patch | peter.otten, 2014年03月02日 08:53 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 30230 | merged | kumaraditya, 2021年12月22日 12:08 | |
| PR 30669 | merged | miss-islington, 2022年01月18日 19:53 | |
| PR 30670 | merged | miss-islington, 2022年01月18日 19:53 | |
| Messages (6) | |||
|---|---|---|---|
| msg212541 - (view) | Author: Peter Otten (peter.otten) * | Date: 2014年03月02日 08:46 | |
The documentation for
copyreg.pickle(type, function, constructor=None)
has the sentence
"TypeError will be raised if *object* is a class or *constructor* is not callable."
It's not clear to me what "object" refers to. I believe it refers to the first arg (called ob_type in 2.x) and classic classes which were handled with
def pickle(ob_type, pickle_function, constructor_ob=None):
if type(ob_type) is _ClassType:
raise TypeError("copy_reg is not intended for use with classes")
in 2.x If I'm right the above sentence should become.
"A TypeError will be raised if *constructor* is not callable."
in 3.x. If I'm wrong please think of way to express the intended meaning more clearly.
Another minor change: class C need not inherit from object explicitly in 3.x.
|
|||
| msg288092 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2017年02月18日 21:09 | |
The phrase "*function* should return either a string or a tuple containing two or three elements." de-facto is outdated too. Since Python 2.3 a tuple returned by the function must have two to five elements. copyreg.constructor() no longer does anything useful, and the constructor parameter of copyreg.pickle() is virtually ignored. |
|||
| msg296271 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2017年06月18日 12:45 | |
Could you update your patch Peter, and since CPython development is moved to GitHub, create a pull request? |
|||
| msg410883 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2022年01月18日 19:53 | |
New changeset 65940fa5c12a4b4a0650c7845044ffd63b94e227 by Kumar Aditya in branch 'main': bpo-20823: Clarify copyreg.pickle() documentation (GH-30230) https://github.com/python/cpython/commit/65940fa5c12a4b4a0650c7845044ffd63b94e227 |
|||
| msg410884 - (view) | Author: miss-islington (miss-islington) | Date: 2022年01月18日 20:17 | |
New changeset 9238a52cbc39c17ca6c7a8cbda32808dd5522a59 by Miss Islington (bot) in branch '3.10': bpo-20823: Clarify copyreg.pickle() documentation (GH-30230) https://github.com/python/cpython/commit/9238a52cbc39c17ca6c7a8cbda32808dd5522a59 |
|||
| msg410885 - (view) | Author: miss-islington (miss-islington) | Date: 2022年01月18日 20:17 | |
New changeset 8527f7a722aee3d9025267cc7ff2eb8afa38d166 by Miss Islington (bot) in branch '3.9': bpo-20823: Clarify copyreg.pickle() documentation (GH-30230) https://github.com/python/cpython/commit/8527f7a722aee3d9025267cc7ff2eb8afa38d166 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:59 | admin | set | github: 65022 |
| 2022年01月18日 20:17:10 | miss-islington | set | messages: + msg410885 |
| 2022年01月18日 20:17:03 | miss-islington | set | messages: + msg410884 |
| 2022年01月18日 19:53:57 | miss-islington | set | pull_requests: + pull_request28870 |
| 2022年01月18日 19:53:52 | miss-islington | set | nosy:
+ miss-islington pull_requests: + pull_request28869 |
| 2022年01月18日 19:53:52 | serhiy.storchaka | set | messages: + msg410883 |
| 2021年12月22日 12:08:45 | kumaraditya | set | keywords:
+ patch nosy: + kumaraditya pull_requests: + pull_request28452 |
| 2021年12月09日 23:26:15 | iritkatriel | set | keywords:
+ easy, - patch title: Clarify copyreg.pickle() documentation -> [doc] Clarify copyreg.pickle() documentation versions: + Python 3.9, Python 3.10, Python 3.11, - Python 3.5, Python 3.6, Python 3.7 |
| 2017年06月18日 12:45:07 | serhiy.storchaka | set | messages: + msg296271 |
| 2017年02月18日 21:09:56 | serhiy.storchaka | set | versions:
+ Python 3.5, Python 3.6, Python 3.7, - Python 3.3 nosy: + serhiy.storchaka messages: + msg288092 type: behavior stage: patch review |
| 2014年03月02日 08:53:02 | peter.otten | set | files:
+ copyreg.patch keywords: + patch |
| 2014年03月02日 08:46:06 | peter.otten | create | |