MCPcopy Index your code
hub / github.com/nodejs/node / get_string

Method get_string

tools/gyp/tools/pretty_vcproj.py:39–58  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

37
38 def __call__(self, x, y):
39 def get_string(node):
40 node_string = "node"
41 node_string += node.nodeName
42 if node.nodeValue:
43 node_string += node.nodeValue
44
45 if node.attributes:
46 # We first sort by name, if present.
47 node_string += node.getAttribute("Name")
48
49 all_nodes = []
50 for name, value in node.attributes.items():
51 all_nodes.append((name, value))
52
53 all_nodes.sort(CmpTuple())
54 for name, value in all_nodes:
55 node_string += name
56 node_string += value
57
58 return node_string
59
60 return cmp(get_string(x), get_string(y))
61

Callers

nothing calls this directly

Calls 4

CmpTupleClass · 0.85
sortMethod · 0.80
itemsMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected