On Wed, Feb 27, 2013 at 2:07 AM, Daniel Holth <dho...@gmail.com> wrote:
> With "prefix equals" would the following evaluate to true?
>
> 1.4 == 1 == 1.3.1

I guess that's the other advantage of the wildcard notation - it makes
it very clear something special is going on :)

For the ".0" expansion, I like Donald's explanation that when two
numbers with an uneven number of components are compared with == or
!=, the shorter one is expanded with ".0" elements until they have the
same number.

That gives the following comparison clauses:

    Compatible version: some-dist (X.Y) # Expects (>= X.Y, < X+1.dev0)
    Wildcard version: some-dist (== X.Y.*) # Expects (>= X.Y, < X.Y+1.dev0)
    Exact version:  some-dist (== X.Y) # Expects X.Y, allows extra ".0" suffixes

I can live with that.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to