This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, docs@python, pitrou
Date 2010-07-19.18:32:20
SpamBayes Score 0.00011752288
Marked as misclassified No
Message-id <AANLkTimJrP7V5TuODHTWuegA24uQev7WuS1lq9LTUAM3@mail.gmail.com>
In-reply-to <1279563445.49.0.71847332292.issue9307@psf.upfronthosting.co.za>
Content
On Mon, Jul 19, 2010 at 2:17 PM, Antoine Pitrou <report@bugs.python.org> wrote:

> .. These flags are primarily useful for C extension developers, there's little point checking them from Python code.

Of course there is: it helps debugging problems in types implemented
in C.  For example, someone working on the numpy issue described in
msg110788, would probably appreciate having
inspect.TPFLAGS_INT_SUBCLASS and would probaly use it in his or hers
unit tests.

My point is: we have __flags__ attribute on type objects exposed in
python there should be a way to interpret what it means without
looking up object.h or C API documentation.

BTW, __flags__ itself could grow a docstring and deserves to be
mentioned in the docs.  Note that copyreg.py uses it to determine
wither a class is dynamically allocated.   Maybe this should also go
to inspect as inspect.isheaptype().
History
Date User Action Args
2010-07-19 18:32:21belopolskysetrecipients: + belopolsky, pitrou, docs@python
2010-07-19 18:32:20belopolskylinkissue9307 messages
2010-07-19 18:32:20belopolskycreate