Clarify some things in PEP 523

This commit is contained in:
Brett Cannon 2016-09-07 14:10:40 -07:00 committed by GitHub
parent 81572832aa
commit dd6f65b17f
1 changed files with 3 additions and 4 deletions

View File

@ -84,12 +84,11 @@ One field is to be added to the ``PyCodeObject`` struct
typedef struct {
...
_PyCodeObjectExtra co_extra; /* "Scratch space" for the code object. */
void *co_extra; /* "Scratch space" for the code object. */
} PyCodeObject;
The ``co_extra`` will be ``NULL`` by default and it is not planned to
be used by CPython itself. Third-party code is free to use the field
as desired. Values stored in the field are expected to not be required
The ``co_extra`` will be ``NULL`` by default and only filled in as
needed. Values stored in the field are expected to not be required
in order for the code object to function, allowing the loss of the
data of the field to be acceptable.