On Thu, 13 Jun 2019 02:07:54 +0200 Victor Stinner <vstin...@redhat.com> wrote: > > For PyCodeOptions: does it contain posonlyargcount? If not, how do you > pass posonlyargcount. I'm not sure if you plan to handle the backward > compatibility.
The idiom to use it could be: PyCodeOptions opts = PyCodeOptions_INIT; // set attributes here PyObject* code_obj = PyCode_NewEx(opts); So you can change the PyCodeOptions_INIT macro when some new fields are added. Regards Antoine. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/XLXKUDDEQLCAAJL366CSXIGWK34TED5G/