tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: comparable PYTHON_VERSION



Thomas Klausner <wiz%NetBSD.org@localhost> writes:

> The attached patch introduces a PYTHON_VERSION that solves all of
> these. It's set to "major_version + 100 * minor_version".

I think you mean

> these. It's set to "major_version * 100 + minor_version".

but ok.

> a) it's 0 if there is no overlap (but I'd like to hear arguments if
> 999 would be a better value)

0 feels more like no python that 9.99.  But, I think the real reason
there is even 0 is to just avoid "PYTHON_VERSION > 309" being an error,
and that if PYTHON_VERSION is actually 0, then we are going to get the
"no valid versions" error, and the comparison does not actually matter.
If that's accurate, I would like to see a comment before setting
PYTHON_VERSION that says that while comparsion results are UB, having no
valid versions leads to a failure and it's just to avoid a type error
masking the intended failure.  But said more coherently!


Home | Main Index | Thread Index | Old Index