|
|
|
|
|
by sczi
218 days ago
|
|
Nice solution with dataclass! And for a complete comparison with the blog you can also use a library to do it for you. It's not quite in the official python distribution but it's maintained by pypa as a dependency of pip so you probably have it installed already. >>> from packaging.version import Version
>>> Version("1.2.3") > Version("1.2.2")
True
>>> Version("2.0") > Version("1.2.2")
True
|
|
I'd use `semver` from PyPI and whatever the equivalent Gem is on the Ruby side in most cases.