Start working on parent class: Renderable_expression and

Computable_expression
This commit is contained in:
Lafrite 2015-02-25 15:23:01 +01:00
parent f400582c5b
commit d88c8ff738
1 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,46 @@
#!/usr/bin/env python
# encoding: utf-8
class Renderable_expression(object):
"""Docstring for Renderable_expression. """
def __init__(self):
"""@todo: to be defined1. """
class Computable_expression(Renderable_expression):
""" A computable_expression is an expression represented by a list of postfix tokens. It's a parent class of a more classical Expression, Fraction and Polynom (and later square root)
Child class will herits those methods
* simplify: Compute entirely the expression
* explain: Generator which return steps which leed to himself
"""
def __init__(self):
"""@todo: to be defined1. """
pass
def simplify(self):
""" Simplify the expression
:returns: the simplified expression with .steps attributes where steps are stocked
"""
pass
def explain(self):
""" Generate and render steps which leed to itself """
pass
# -----------------------------
# Reglages pour 'vim'
# vim:set autoindent expandtab tabstop=4 shiftwidth=4:
# cursor: 16 del