[docs] [issue33050] Centralized documentation of assumptions made by C code
Timothy VanSlyke
report at bugs.python.org
Sun Mar 11 14:17:26 EDT 2018
New submission from Timothy VanSlyke <vanslyke.t at husky.neu.edu>:
It would be nice for those who write C extensions to have a resource that explicitly states what assumptions are made by the CPython implementation that are otherwise implementation-defined in standard C.
For example, Python versions >= 3.6 require:
- That UCHAR_MAX is defined to be 255 (from Python.h)
- That fixed-width intXX_t and uintXX_t types are provided in stdint.h and inttypes.h (from PEP7)
These two requirements also pretty much guarantee that CHAR_BIT == 8. These kinds of things are nice to know for anybody working with the C API; we can make the same assumptions in our own code without having hunt through the API docs or the CPython source tree every time something comes up.
>From what I've found, there isn't any component of the documentation that explicitly lists these assumptions in one place (I apologize if there is and I somehow missed it...). Could this be addressed in the future?
Thanks!
----------
assignee: docs at python
components: Documentation
messages: 313607
nosy: docs at python, tvanslyke
priority: normal
severity: normal
status: open
title: Centralized documentation of assumptions made by C code
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33050>
_______________________________________
More information about the docs
mailing list