<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, 30 Aug 2016 at 01:20 Maciej Fijalkowski <<a href="mailto:fijall@gmail.com">fijall@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Aug 30, 2016 at 3:00 AM, Brett Cannon <<a href="mailto:brett@python.org" target="_blank">brett@python.org</a>> wrote:<br>
><br>
><br>
> On Mon, Aug 29, 2016, 17:06 Terry Reedy <<a href="mailto:tjreedy@udel.edu" target="_blank">tjreedy@udel.edu</a>> wrote:<br>
>><br>
>> On 8/29/2016 5:38 PM, Brett Cannon wrote:<br>
>><br>
>> > who objected to the new field did either for memory ("it adds another<br>
>> > pointer to the struct that won't be typically used"), or for conceptual<br>
>> > reasons ("the code object is immutable and you're proposing a mutable<br>
>> > field"). The latter is addressed by not exposing the field in Python and<br>
>><br>
>> Am I correct is thinking that you will also not add the new field as an<br>
>> argument to PyCode_New?<br>
><br>
><br>
> Correct.<br>
><br>
>><br>
>>  > clearly stating that code should never expect the field to be filled.<br>
>><br>
>> I interpret this as "The only code that should access the field should<br>
>> be code that put something there."<br>
><br>
><br>
> Yep, seems like a reasonable rule to follow.<br>
><br>
> -brett<br>
<br>
How do we make sure that multuple tools don't stomp on each other?<br></blockquote><div><br></div><div>It will be up to the tool. For Pyjion we just don't use the field if someone else is using it, so if vmprof chooses to take precedence then it can. Otherwise we can work out some common practice like if the field is set and it isn't an object you put there then create a list, push on what was already there, push on what you want to add, and set the field to the list. That lets us do a type-check for the common case of only one object being set, and in the odd case of the list things don't fail as you can search the list for your object while acknowledging performance will suffer (or we use a dict, I don't care really as long as we don't require a storage data structure for the field in the single user case).</div><div><br></div><div>My point is that we can figure this out among Pyjion, PTVS, and vmprof if we are the first users and update the PEP accordingly as guidance.</div></div></div>