Uncategorized

PEP 739: Static description file for Python installations – Standards


We’re talking about a JSON file here. Surely if you’re able to parse JSON, you must be able to handle the version_parts object?

My usual baseline is whether it’s useful with Bash+jq, so that you can use shell scripts to do useful things with the file. I’m not sure what it’s actually capable of here, but you don’t have to do any better than extract all 8 characters and be able to sort them (case-insensitive ASCII sort of a hex number should match a numeric sort, provided they’re the same length).

(Personally I mostly use Powershell, which can do a rich Version object, though it’d still be more convenient to pull out a ready-crafted hex string.)



1 Like



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *