PyDocs

Nav

Python Language Services

fix_missing_locations

ast

function (source)
  • fix_missing_locations(node)
When you compile a node tree with compile(), the compiler expects lineno and
col_offset attributes for every node that supports them.  This is rather
tedious to fill in for generated nodes, so this helper adds these attributes
recursively where not already set, by setting them to the values of the
parent node.  It works recursively starting at *node*.
0 Examples
No examples for ast/fix_missing_locations.
See Also
No see-alsos for ast/fix_missing_locations
0 Notes
No notes for fix_missing_locations