From b885bb6b8f92f81fb5a367be056a8af857c8864b Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Sun, 21 Jan 2018 12:21:13 +0300 Subject: [PATCH] Start expression API --- mapytex/calculus/API/expression.py | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 mapytex/calculus/API/expression.py diff --git a/mapytex/calculus/API/expression.py b/mapytex/calculus/API/expression.py new file mode 100644 index 0000000..5786db1 --- /dev/null +++ b/mapytex/calculus/API/expression.py @@ -0,0 +1,54 @@ +#! /usr/bin/env python +# -*- coding: utf-8 -*- +# vim:fenc=utf-8 +# +# Copyright © 2017 lafrite +# +# Distributed under terms of the MIT license. + +""" +Expression + +""" + + + +class Expression(object): + + """ + Expression class + + """ + + def __init__(self,): + """ + """ + pass + + @classmethod + def from_str(cls, string): + """ Initiate the expression from a string + + :param string: TODO + :returns: TODO + + """ + pass + + @classmethod + def random(self, template, conditions = [], shuffle = False): + """ Initiate randomly the expression + + :param template: the template of the expression + :param conditions: conditions on randomly generate variable + :param shuffle: allowing to shuffle the tree + :returns: TODO + + """ + pass + + +# ----------------------------- +# Reglages pour 'vim' +# vim:set autoindent expandtab tabstop=4 shiftwidth=4: +# cursor: 16 del