[issue44353] PEP 604 NewType
Ken Jin
report at bugs.python.org
Mon Jul 12 08:06:44 EDT 2021
Ken Jin <kenjin4096 at gmail.com> added the comment:
@Yurii, I would like to caution against a C accelerator for the typing module. My reasoning follows:
1. The maintenance burden is higher. typing is already somewhat complex in Python (lots of MRO/metaclass wizardry). A C module would require knowledge of the C API.
2. Following from 1., I fear it may raise the barrier for contributions. This is purely anecdotal but I think there are more contributors who know Python than Python + C API.
3. C API code is much more error-prone than Python code.
4. It's very hard to find available reviewers for typing-related C changes.
5. Backports become harder due to point 3. and 4. Also C code needs much more scrutiny. If we cause some obscure bug in Python, it raises an exception; in C it potentially segfaults and kills the interpreter.
6. Third-party monkey-patching becomes harder.
Unfortunately, I can't offer a good solution to this issue at the moment either.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44353>
_______________________________________
More information about the Python-bugs-list
mailing list