MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / to_number

Function to_number

_pydevd_bundle/pydevd_utils.py:59–76  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

57
58
59def to_number(x):
60 if is_string(x):
61 try:
62 n = float(x)
63 return n
64 except ValueError:
65 pass
66
67 l = x.find("(")
68 if l != -1:
69 y = x[0 : l - 1]
70 # print y
71 try:
72 n = float(y)
73 return n
74 except ValueError:
75 pass
76 return None
77
78
79def compare_object_attrs_key(x):

Callers 1

compare_object_attrs_keyFunction · 0.85

Calls 2

is_stringFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected