New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
semver-object #40
Comments
@Thor77 you can already do that:
|
I know there are already ways to accomplish this in your library, but they're verbose and not object-orientated. ver = semver.parse_version_info('1.0.0')
ver.bump_{major,minor,patch}() does not work. |
@Thor77 ah, I see what you mean. So, if you want to make a nice PR implementing a Semver class with all the object-oriented functionality, I wouldn't mind accepting it :) |
Although I'm not a big fan of an "all object" approach (or too much objects), I think a static method named from semver import VersionInfo
VersionInfo.parse("1.2.3") |
In my opinion your approach to parsing is quite "unpythonic", I would prefer smth like this:
that would allow easy comparison with
(yes I know there's
semver.compare
for that)Python is a object-orientated language after all ;)
The text was updated successfully, but these errors were encountered: