class documentation
class PythonConstant: (source)
Known subclasses: pytype.abstract._instances.ConcreteValue
, pytype.abstract._instances.LazyConcreteDict
, pytype.abstract._instances.List
, pytype.abstract._instances.Tuple
, pytype.abstract.mixin.PythonDict
A mix-in for storing actual Python constants, not just their types. This is used for things that are stored in cfg.Variable, but where we may need the actual data in order to proceed later. E.g. function / class definitions, tuples. Also, potentially: Small integers, strings (E.g. "w", "r" etc.).
Method | __repr__ |
Undocumented |
Method | init |
Mix-in equivalent of __init__. |
Method | str |
Get a string representation of this constant. |
Class Variable | overloads |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | pyval |
Undocumented |
Instance Variable | _printing |
Undocumented |
overridden in
pytype.abstract._instances.Dict
, pytype.abstract._instances.List
, pytype.abstract._instances.Tuple
Get a string representation of this constant. Args: printer: A BaseValue -> str function that will be used to print abstract values. Returns: A string of self.pyval.