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.

classification
Title: Correctly classify builtin static and class methods
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: serhiy.storchaka, yselivanov
Priority: normal Keywords: patch

Created on 2017-12-09 22:54 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 4776 merged serhiy.storchaka, 2017-12-09 23:04
Messages (2)
msg307928 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-12-09 22:54
Currently class and some static methods of builtin types are classified as plain methods. The proposed patch adds types.ClassMethodDescriptorType for unbound class methods of builtin types and makes inspect.classify_class_attrs() correctly classifying static and class methods of builtin types. This results in changing the help() output.

All __new__ methods now are classified as static.

Examples of class methods are dict.fromkeys and int.from_bytes.
msg308389 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-12-15 12:13
New changeset 3327a2ddf1eaf8cc678f0219ba9edf7d632d1b20 by Serhiy Storchaka in branch 'master':
bpo-32265: Classify class and static methods of builtin types. (#4776)
https://github.com/python/cpython/commit/3327a2ddf1eaf8cc678f0219ba9edf7d632d1b20
History
Date User Action Args
2022-04-11 14:58:55adminsetgithub: 76446
2017-12-15 12:14:40serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-12-15 12:13:43serhiy.storchakasetmessages: + msg308389
2017-12-09 23:04:18serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request4677
2017-12-09 22:54:10serhiy.storchakacreate