91 Function to extract the value of a node. |
91 Function to extract the value of a node. |
92 |
92 |
93 @param node reference to the node to extract the value from |
93 @param node reference to the node to extract the value from |
94 @type ast.Constant |
94 @type ast.Constant |
95 @return value of the node |
95 @return value of the node |
96 @rtype any |
96 @rtype Any |
97 @exception TypeError raised to indicate an unsupported type |
97 @exception TypeError raised to indicate an unsupported type |
98 """ |
98 """ |
99 if not isinstance(node, ast.Constant): |
99 if not isinstance(node, ast.Constant): |
100 raise TypeError("Illegal node type passed.") |
100 raise TypeError("Illegal node type passed.") |
101 |
101 |