CodeQL library for Python
codeql/python-all 3.0.1-dev (changelog, source)
Search

Member predicate API::Node::getSubscript

Gets a node representing a subscript of this node at (string) index key. This requires that the index can be statically determined.

For example, the subscripts of a and b below would be found using the index foo:

a["foo"]
x = "foo" if cond else "bar"
b[x]
Node getSubscript(string key)