Skip to content

Commit

Permalink
Add support for Python 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kxepal committed Feb 8, 2012
1 parent 1e08e7b commit 61cfbac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions semver.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
'(\-(?P<prerelease>[0-9A-Za-z]+(\.[0-9A-Za-z]+)*))?'
'(\+(?P<build>[0-9A-Za-z]+(\.[0-9A-Za-z]+)*))?$')

if 'cmp' not in __builtins__:
cmp = lambda a,b: (a > b) - (a < b)

def parse(version):
"""
Parse version to major, minor, patch, pre-release, build parts.
Expand Down

0 comments on commit 61cfbac

Please sign in to comment.