class documentation
class LocalsDictNode(BaseNode): (source)
Known subclasses: klara.core.bases.ClassInstance
, klara.core.scoped_node_classes.ClassDef
, klara.core.scoped_node_classes.DictComp
, klara.core.scoped_node_classes.FunctionDef
, klara.core.scoped_node_classes.GeneratorExp
, klara.core.scoped_node_classes.Lambda
, klara.core.scoped_node_classes.ListComp
, klara.core.scoped_node_classes.Module
, klara.core.scoped_node_classes.SetComp
Class Method | from |
Undocumented |
Method | __init__ |
Undocumented |
Method | create |
Undocumented |
Method | get |
return the latest statement in locals dict |
Method | get |
Get the latest version from stack, and get the corresponding statement |
Method | get |
get the version number of the var, create the var entry if it's not exists |
Method | remove |
Undocumented |
Method | resolve |
Undocumented |
Method | scope |
return the first containing scope |
Method | update |
increment the version of the var inside the dict and return the version number :param var: :param block_label: :return: |
Instance Variable | containing |
Undocumented |
Instance Variable | global |
Undocumented |
Instance Variable | instance |
Undocumented |
Instance Variable | locals |
Undocumented |
Instance Variable | ssa |
Undocumented |
Inherited from BaseNode
:
Static Method | get |
Undocumented |
Method | __contains__ |
Undocumented |
Method | accept |
Undocumented |
Method | dunder |
try to resolve the dunder method |
Method | generic |
Undocumented |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | get |
find the definition of `var` from outer scope recursively. Skip param will determine how many parent scope to skip :param var: variable of interest :param skip: how many layer of parent scope to skip :return:... |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | get |
get the assigning target instance rather than scope(). See #mr68u a.b.c = node calling node.get_target_instance() will return `a.b.c.instance()` |
Method | is |
check if the given node is part of 'self' or children |
Method | iter |
Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` that is present on *node*. |
Method | prepare |
Undocumented |
Method | statement |
Undocumented |
Instance Variable | col |
Undocumented |
Instance Variable | explicit |
Undocumented |
Instance Variable | lineno |
Undocumented |
Instance Variable | parent |
Undocumented |
Instance Variable | refer |
Undocumented |
Class Variable | _fields |
Undocumented |
overrides
klara.core.bases.BaseNode.__init__
overridden in
klara.core.bases.ClassInstance
, klara.core.scoped_node_classes.ClassDef
, klara.core.scoped_node_classes.DictComp
, klara.core.scoped_node_classes.FunctionDef
, klara.core.scoped_node_classes.GeneratorExp
, klara.core.scoped_node_classes.Lambda
, klara.core.scoped_node_classes.ListComp
, klara.core.scoped_node_classes.Module
, klara.core.scoped_node_classes.SetComp
Undocumented
get the version number of the var, create the var entry if it's not exists
Parameters | |
var:str | Undocumented |
increment the version of the var inside the dict and return the version number :param var: :param block_label: :return:
Parameters | |
var:str | Undocumented |