[issue32980] Remove functions that do nothing in _Py_InitializeCore()
Thomas Nyberg
report at bugs.python.org
Thu Mar 1 11:57:13 EST 2018
New submission from Thomas Nyberg <tomnyberg at gmail.com>:
The `_PyFrame_Init()` and `PyByteArray_Init()` functions are called in these two locations in the `_Py_InitializeCore()` function:
https://github.com/python/cpython/blob/master/Python/pylifecycle.c#L693-L694
https://github.com/python/cpython/blob/master/Python/pylifecycle.c#L699-L700
But their function definitions appear to do nothing:
https://github.com/python/cpython/blob/master/Objects/frameobject.c#L555-L561
https://github.com/python/cpython/blob/master/Objects/bytearrayobject.c#L24-L28
I can understand leaving the functions in the source for backwards-compatibility, but why are they still being called in `_Py_InitializeCore()`? Seems like it just adds noise for those new to the cpython internals (I certainly found it confusing myself).
Ned Batchelder recommended possibly making a change:
https://mail.python.org/pipermail/python-list/2018-March/731402.html
----------
messages: 313100
nosy: thomas.nyberg
priority: normal
severity: normal
status: open
title: Remove functions that do nothing in _Py_InitializeCore()
type: enhancement
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32980>
_______________________________________
More information about the Python-bugs-list
mailing list