MCPcopy Index your code
hub / github.com/python/cpython / _parse_feature_string

Function _parse_feature_string

Lib/xml/dom/domreg.py:82–99  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

80 raise ImportError("no suitable DOM implementation found")
81
82def _parse_feature_string(s):
83 features = []
84 parts = s.split()
85 i = 0
86 length = len(parts)
87 while i < length:
88 feature = parts[i]
89 if feature[0] in "0123456789":
90 raise ValueError("bad feature name: %r" % (feature,))
91 i = i + 1
92 version = None
93 if i < length:
94 v = parts[i]
95 if v[0] in "0123456789":
96 i = i + 1
97 version = v
98 features.append((feature, version))
99 return tuple(features)

Callers 1

getDOMImplementationFunction · 0.85

Calls 2

splitMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…