Nick Coghlan added the comment:

_PY_SET_FINALIZED is only one letter longer than _PY_ONCEVAR_INIT and the same 
length as the originally proposed _PY_STATICVAR_INIT.

Since it shouldn't be anywhere near as common as _Py_SETREF, I'm also okay in 
general with trading a bit of brevity for accuracy.

However, I don't want to trade away *too* much brevity, so I think we're going 
to have to choose between reminding readers of "this is finalized in 
Py_Finalize" or "this is a no-op if the target is already set", and leave the 
other aspect implicit.

In addition to the correctness argument above, my rationale for now favouring 
the former is that the logical leap in "this is finalized in Py_Finalize, so 
the assigned expression will only be executed once per Py_Initialize call" 
seems more reasonable to me than the one in "the assigned expression is only 
executed once per Py_Initialize call, so it will be finalized in Py_Finalize".

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29881>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to