[Distutils] [Python-Dev] [Python-checkins] peps: PEP 426: replace implied 'version starts with' with new ~= operator

Chris Jerdonek chris.jerdonek at gmail.com
Tue Feb 26 14:55:33 CET 2013


On Tue, Feb 26, 2013 at 5:23 AM, Donald Stufft <donald.stufft at gmail.com> wrote:
> On Tuesday, February 26, 2013 at 8:17 AM, Nick Coghlan wrote:
>
> I *don't* like the idea of (== 1.3) and (== 1.3.0) being equivalent
> when (1.3) and (1.3.0) are substantially different, though. Instead,
> I'll reinstate a variant of the commentary from PEP 386 that pointed
> out the value of always publishing releases with a consistent number
> of components by including the trailing ".0".
>
> I think it makes absolute sense. These aren't strings they are version
> numbers.
>
> 1.0 == 1.00 == 1.00 == 1.000, adding more zeros doesn't change the
> semantics.

In numeric contexts, the semantics do change.  There is a notion of
precision or significant digits.  For example, 1.04 can be expressed
by 1.0 but not by 1.00.

--Chris


More information about the Distutils-SIG mailing list