I am trying to convert an older library that maps dependencies called snakefood over to Python 3. I have 2 parts I can't figure out what to substitute as I can't find documentation on what either function does - from compiler.ast import Discard, Const I can't seem to find an equivalent in Python 3 in the ast library. Here are the function calls from Python 2, see both here being used in isinstance() calls:
def default(self, node):
pragma = None
if self.recent:
if isinstance(node, Discard):
children = node.getChildren()
if len(children) == 1 and isinstance(children[0], Const):
const_node = children[0]
pragma = const_node.value
self.accept_imports(pragma)
Apologies for not understanding this stuff, I just learned about AST calls trying to use this library. Much appreciated.