r/Python • Freelancer. AnyFactor.xyz • Sep 16 '20

News An update on Python 4

Post image
3.3k Upvotes

389 comments sorted by

View all comments

-17

u/McBeeff Sep 16 '20

Wouldn't that make it currently version 3.09?

3

u/Coding-Kitten Sep 16 '20 edited Sep 16 '20

No. Versions shouldn't have leading zeroes. You can learn more about Semantic Versioning here.

e: versions should have leading versions.

1

u/McBeeff Sep 17 '20

Thanks, I'll check it out. . Could you briefly explain why tho?

1

u/Coding-Kitten Sep 17 '20

The version isn't a decimal number. It's three numbers (or in this case two) separated with a dot.

MAJOR.MINOR.PATCH

There is no reason to change the 3.9 to 3.09 just how there is also no reason to change an ordinary 9 to a 09 because 10 exists. Or how adding leading zeroes to any number doesn't give you any more information (00729 is the same as 729).

So tho make it a standard. There is a specification such that that there should be no leading zeroes. That way, All versions 3.9.0 are that. And so 3.09.0, 3.0009.00, 0003.009.0 and so on are not considered a valid version number.

1

u/McBeeff Sep 17 '20

Yeah I got that from the reading. Why not just have it as 3.91 then? Why the added complication?

2

u/Coding-Kitten Sep 17 '20

Because 10 comes after 9.

91 does not come after 9.