[Python-ideas] RFC: PEP: Add dict.__version__

Victor Stinner victor.stinner at gmail.com
Sun Jan 10 19:15:47 EST 2016


2016-01-10 19:35 GMT+01:00 Neil Girdhar <mistersheik at gmail.com>:
> If the answer is "no" then honestly no user should write code counting on
> the existence of __version__.

For my use case, I don't need a public (read-only) property at the
Python level. When I wrote the PEP, I proposed a public property to
try to find more use cases and make the PEP more interesting.

I'm not sure anymore that it's worth since they are legit and good
counterargument were listed:

* it gives more work for other Python implementations, whereas they
may not use or benefit from the overall API for static optimizers
(discussed in following PEPs). Except of guards used for static
optimizers, I don't see any use case for dictionary versionning.

* the behaviour on integer overflow is an implementation detail, it's
sad to have to describe it in the specification of a *Python*
property. Users expect Python to abtract the hardware

Victor


More information about the Python-ideas mailing list