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

Function _norm_version

Lib/platform.py:241–254  ·  view source on GitHub ↗

Normalize the version and build strings and return a single version string using the format major.minor.build (or patchlevel).

(version, build='')

Source from the content-addressed store, hash-verified

239 return lib, version
240
241def _norm_version(version, build=''):
242
243 """ Normalize the version and build strings and return a single
244 version string using the format major.minor.build (or patchlevel).
245 """
246 l = version.split('.')
247 if build:
248 l.append(build)
249 try:
250 strings = list(map(str, map(int, l)))
251 except ValueError:
252 strings = l
253 version = '.'.join(strings[:3])
254 return version
255
256
257# Examples of VER command output:

Callers 1

_syscmd_verFunction · 0.85

Calls 4

listClass · 0.85
splitMethod · 0.45
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected