Start expression API

This commit is contained in:
Bertrand Benjamin 2018-01-21 12:21:13 +03:00
parent 273675b243
commit b885bb6b8f

View File

@ -0,0 +1,54 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2017 lafrite <lafrite@Poivre>
#
# 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