is_newer_version(v1, v2), where each version is a tuple of ints like (1, 4, 2) for major.minor.patch. Return True if v1 is strictly newer than v2, relying directly on Python's built-in lexicographic tuple comparison — no manual field-by-field if/elif chain.is_newer_version((1, 4, 2), (1, 3, 9))
True
Minor version 4 beats 3, so v1 is newer regardless of the patch numbers.
is_newer_version((1, 4), (1, 4, 0))
False
(1, 4) is a strict prefix of (1, 4, 0) and Python treats the shorter prefix as smaller, so v1 is not newer.
Python compares tuples element by element and, on a matching prefix, the shorter tuple counts as smaller.
v1 > v2 does exactly this comparison.