New submission from Oleg Iarygin <[email protected]>:
- Convert method.__reduce__, method.__new__, and instancemethod.__new__ to AC.
It looks like nothing else can be converted in classobject.c.
This is my first time working with AC so I could make some mistakes.
- Fix found mismatches in method.__new__ where docstring and implementation
diverged:
- on how to name arguments (function vs func, instance vs self) - `fuct` is a
semi-abbreviation and `self` is a special argument of instance methods. No
compatibility is harmed because these arguments were forced to be
positional-only anyway with `if (!_PyArg_NoKeywords("method", kw)) return
NULL;`.
- on whether args are positional (the implementation called
_PyArg_NoKeywords) or not (the documentation and
Lib/idlelib/idle_test/test_calltip.py:80) - align with other assertions in
`test_builtins()` that have reference docstrings with both `/` marker and a
proper description.
Minor refactoring:
- Since PyMethod_Type and PyInstanceMethod_Type are modified anyway, transform
their initialization to C99-style.
- Change a disabler for PyInstanceMethod_Type.tp_hash from comments to `#if 0`.
----------
components: Interpreter Core
messages: 414643
nosy: arhadthedev
priority: normal
severity: normal
status: open
title: Convert Object/classobject.c to Argument Clinic
type: enhancement
versions: Python 3.11
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46942>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com