5.1.1.2.1.3.1.5. pycropml.transpiler.rules.pythonRules module

class pycropml.transpiler.rules.pythonRules.PythonRules[source]

Bases: pycropml.transpiler.rules.generalRule.GeneralRule

binary_op = {'!=': '!=', '*': '*', '+': '+', '-': '-', '/': '/', '<': '<', '<=': '<=', '==': '==', '>': '>', '>=': '>=', 'and': 'and', 'not': 'not', 'or': 'or'}
functions = {'datetime': {'datetime': 'datetime'}, 'math': {'acos': 'acos', 'asin': 'asin', 'atan': 'atan', 'ceil': 'ceil', 'cos': 'cos', 'exp': 'exp', 'ln': 'log', 'log': 'log', 'round': 'round', 'sin': 'sin', 'sqrt': 'sqrt', 'tan': 'tan'}, 'system': {'abs': 'abs', 'max': 'max', 'min': 'min', 'pow': 'pow'}}
methods = {'array': {'len': 'len'}, 'datetime': {'datetime': 'datetime', 'day': 'day'}, 'dict': {'get': '.get', 'keys': <function translateDictkeys>, 'len': 'len'}, 'float': {'int': 'int'}, 'int': {'float': 'float'}, 'list': {'append': '.append', 'contains?': <function PythonRules.<lambda>>, 'index': '.index', 'len': 'len', 'not contains?': <function translateNotContains>, 'pop': '.pop', 'sum': 'sum'}, 'str': {'find': '.index', 'int': 'int'}}
types = {'bool': 'bool', 'datetime': 'datetime', 'dict': 'dict', 'float': 'float', 'int': 'int', 'list': 'list', 'str': 'str', 'tuple': 'tuple'}
unary_op = {'+': '+', '-': '-', 'not': 'not ', '~': '~'}
pycropml.transpiler.rules.pythonRules.translateDictkeys(node)[source]
pycropml.transpiler.rules.pythonRules.translateNotContains(node)[source]