MCPcopy Index your code
hub / github.com/RustPython/RustPython / _comparable_version

Function _comparable_version

Lib/platform.py:145–156  ·  view source on GitHub ↗
(version)

Source from the content-addressed store, hash-verified

143
144
145def _comparable_version(version):
146 component_re = re.compile(r'([0-9]+|[._+-])')
147 result = []
148 for v in component_re.split(version):
149 if v not in '._+-':
150 try:
151 v = int(v, 10)
152 t = 100
153 except ValueError:
154 t = _ver_stages.get(v, 0)
155 result.extend((t, v))
156 return result
157
158### Platform specific APIs
159

Callers

nothing calls this directly

Calls 4

compileMethod · 0.45
splitMethod · 0.45
getMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected