[Python-Dev] Update on PEP 523 and adding a co_extra field to code objects (original) (raw)

Brett Cannon brett at python.org
Mon Aug 29 21:00:59 EDT 2016


On Mon, Aug 29, 2016, 17:06 Terry Reedy <tjreedy at udel.edu> wrote:

On 8/29/2016 5:38 PM, Brett Cannon wrote:

> who objected to the new field did either for memory ("it adds another > pointer to the struct that won't be typically used"), or for conceptual > reasons ("the code object is immutable and you're proposing a mutable > field"). The latter is addressed by not exposing the field in Python and Am I correct is thinking that you will also not add the new field as an argument to PyCodeNew?

Correct.

> clearly stating that code should never expect the field to be filled.

I interpret this as "The only code that should access the field should be code that put something there."

Yep, seems like a reasonable rule to follow.

-brett

-- Terry Jan Reedy


Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/brett%40python.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20160830/8c6838a0/attachment.html>



More information about the Python-Dev mailing list