[issue18091] Remove PyNoArgsFunction

Larry Hastings report at bugs.python.org
Wed May 29 04:00:44 CEST 2013


New submission from Larry Hastings:

There's a typedef in methodobject.h called PyNoArgsFunction.  You might think it's used for METH_NOARGS functions--you'd be wrong, those use PyCFunction and pass in NULL for args.

No, PyNoArgsFunction is never used.  Nor is it documented.  It's found in exactly one place in the CPython tree, and that's when it's declared.  We should consider removing it.

Note that I'm pretty sure this will break external code; a quick Google found that Blender's extension interface uses it.  And AFAICT they still use it, and they *have* moved to Python 3.  So I could believe the right call is "we better leave it in".

I suspect that PyNoArgsFunction *was* used once upon a time.  I further suspect that year started with a 1.

----------
components: Interpreter Core
messages: 190264
nosy: larry
priority: low
severity: normal
stage: needs patch
status: open
title: Remove PyNoArgsFunction
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18091>
_______________________________________


More information about the Python-bugs-list mailing list