3 ===============================
4 rules for python syntax
5 ===============================
7 Variable names and identifiers are similar to those in many other languages :
8 ----------------------------------------------------------------------------
10 * They start with a letter (A_Z or a-z) or underscore "_"".
11 * They are followed by letters, numbers or underscores.
12 * They are case-sensitive.
13 * A string is a sequence of caracters enclosed by a matching pair of single or double quotes.
15 Eficas does not allow you to use uncorrect names :
17 .. image:: images/NomPython.png
19 Some identifiers are reserved words :
20 -------------------------------------
22 * You can't use words of the python language as identifiers.
23 * Eficas itself uses identifiers which become reserved words. For example, you can't use the following words, even if it would make some interesting names:
24 - BLOC, EXCLUS, OPER, ASSD,
25 - EVAL, FACT, FORM, JDC,
29 Python's way for assigning values to variables:
30 -------------------------------------------------
32 * Keep in mind that ".comm" are python files. The simplest form of assignement is : variable = value
33 * The hash character (#) starts a comment
34 * Tuples are enclosed in parentheses.
35 * Lists are enclosed in bracked.
36 * In tuples or lists, a ',' follows each item especially the last one.
38 .. image:: images/ListeEtTuple.png