[New-bugs-announce] [issue24945] Expose Py_TPFLAGS_ values from Python

Erik Bray report at bugs.python.org
Thu Aug 27 15:50:54 CEST 2015


New submission from Erik Bray:

Although admittedly rare, I've on more than one occasion wanted to inspect the tp_flags of a given class.  It seems silly to me that although tp_flags is exposed to Python via type.__flags__, I then have to go rummaging around in Include/object.h in order to actually interpret the value of that attribute.

It would be nice, then, if the Py_TPFLAGS_* values were exposed as constants somewhere in Python (perhaps in the sys module)?

If it's agreed this is a good idea I'll gladly provide a patch if someone can point me toward where this would best live.

----------
components: Interpreter Core
messages: 249233
nosy: erik.bray
priority: normal
severity: normal
status: open
title: Expose Py_TPFLAGS_ values from Python
type: enhancement

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


More information about the New-bugs-announce mailing list