[Python-Dev] PEP 509
Victor Stinner
victor.stinner at gmail.com
Tue Jan 12 16:42:35 EST 2016
2016-01-12 19:34 GMT+01:00 Jim J. Jewett <jimjjewett at gmail.com>:
> (1) Please make it clear within the abstract what counts as a change.
I don't think that an abstract must give the long list of cases when
the version is modified or not. It's explained in detail at:
https://www.python.org/dev/peps/pep-0509/#changes
> (1b) Is there a way to force a version update?
No. Why would you do that? (What is your use case.)
FYI there is a private API in _testcapi to set the version, for unit tests.
> (2) I would like to see a .get on the guard object, so that it could
> be used in place of the dict lookup even from python. If this doesn't
> make sense (e.g., doesn't really save time since the guard has to be
> used from python), please mention that in the Guard Example text.
Optimizations are out of the scope of this PEP.
Please see https://www.python.org/dev/peps/pep-0510/ to more examples
of specialization with guards.
See also https://faster-cpython.readthedocs.org/fat_python.html for
concrete optimizations using specialization with guards.
> (3) It would be possible to define the field as reserved in the main
> header, and require another header to use it even from C.
>
> (3a) This level of privacy might be overkill, but I would prefer that
> the decision be explicit.
>
> (3b) The change should almost certainly be hidden from the ABI / Py_LIMITED_API
Oh, the PyDictObject structure is not part of the stable ABI. It seems
worth to mention it in the PEP.
Victor
More information about the Python-Dev
mailing list