MCPcopy Create free account
hub / github.com/rthalley/dnspython / _tuple_from_text

Function _tuple_from_text

dns/_features.py:9–20  ·  view source on GitHub ↗
(version: str)

Source from the content-addressed store, hash-verified

7
8
9def _tuple_from_text(version: str) -> Tuple:
10 text_parts = version.split(".")
11 int_parts = []
12 for text_part in text_parts:
13 digit_prefix = "".join(
14 itertools.takewhile(lambda x: x in string.digits, text_part)
15 )
16 try:
17 int_parts.append(int(digit_prefix))
18 except Exception:
19 break
20 return tuple(int_parts)
21
22
23def _version_check(

Callers 3

test_features.pyFile · 0.90
test_tuple_from_textFunction · 0.90
_version_checkFunction · 0.85

Calls 1

splitMethod · 0.45

Tested by 1

test_tuple_from_textFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…