MCPcopy Create free account
hub / github.com/ActiveState/code / getBasePattern

Method getBasePattern

recipes/Python/111969_Blender/recipe-111969.py:43–57  ·  view source on GitHub ↗

returns a pattern in the format [name1: value1, name2: value2, ...] excluding the instance-attributes of this class

(self, values)

Source from the content-addressed store, hash-verified

41 return values
42
43 def getBasePattern(self, values):
44 """returns a pattern in the format
45 [name1: value1, name2: value2, ...]
46 excluding the instance-attributes of this class
47 """
48 names = values.keys()
49 names.sort()
50 result = "["
51 for name in names:
52 if name not in ["BlendPattern",
53 "BlendValues",
54 "StartToken",
55 "EndToken"]:
56 result += name + ": " + self.getTokenName(name) + ", "
57 return result[0:-2] + "]"
58
59 def getPattern(self, pattern, values):
60 """returns a pattern for this instance. if no pattern is defined

Callers 1

getPatternMethod · 0.95

Calls 3

getTokenNameMethod · 0.95
keysMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected