Call Special Functions for Operators Like Python
Call special functions to process operators. Use the same function names and semantics like in Python.
Blueprint information
Related branches
Related bugs
Sprints
Whiteboard
Operators are implemented with specially named methods like in Python. For details see:
http://
SIML uses special methods and data attributes that do not exist in Python. Names for these special attributes begin with the string '__siml_'. With this convention there are no accidental clashes with special attributes from Python, and it can also be easily guessed that theses methods (__siml_foo__) are special methods for the Siml language.
- Assignment:
__siml_
- Boolean operators:
There are special functions for the boolean operators. The 'and' and 'or' operators are not short-circuit operators like in Python, but both arguments are always evaluated.
__siml_
__siml_
__siml_
In the future the complete algorithm detailed in PEP 335 will be implemented, to get short-circuit behavior.
http://
- String conversion:
__siml_str__ behaves like __str__, but returns a Siml string instance.
Proposed method:
- Graph creation:
__siml_graph__ called by the built in graph function, calls built in graph function on Float attributes.
- Differentiation:
__siml_
Work Items
Dependency tree
* Blueprints in grey have been implemented.