diff options
author | CleoQc <cleoqc1124@gmail.com> | 2018-11-12 13:56:41 -0500 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2019-07-22 12:27:56 -0700 |
commit | fd00805ca76808197758800d9d19ee2d6ac708ae (patch) | |
tree | a53cf0f499e33b59c6b91efb46b2dc269f95c3a9 /docs/templates.rst | |
parent | 626bdd08d4a6b878f6291a64eceb099f39a808a8 (diff) | |
download | jinja2-fd00805ca76808197758800d9d19ee2d6ac708ae.tar.gz |
support scientific notation
Diffstat (limited to 'docs/templates.rst')
-rw-r--r-- | docs/templates.rst | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/docs/templates.rst b/docs/templates.rst index 6d3bf36..9da0577 100644 --- a/docs/templates.rst +++ b/docs/templates.rst @@ -1177,12 +1177,19 @@ for Python objects such as strings and numbers. The following literals exist: arguments to function calls and filters, or just to extend or include a template). -42 / 42.23: - Integers and floating point numbers are created by just writing the - number down. If a dot is present, the number is a float, otherwise an +42: + Integers numbers are created by just writing the number down. + If a dot is present, the number will be considered a float, otherwise an integer. Keep in mind that, in Python, ``42`` and ``42.0`` are different (``int`` and ``float``, respectively). +42.23 / 42e2 / 42E2 / 1e0: + Floating point numbers are created by just writing the + number down. Floating points can be written using the dot as a decimal mark, + or they can be written in scientific notation in which + case you can use lower case 'e' or upper case 'E' to indicate the exponent + part. + ['list', 'of', 'objects']: Everything between two brackets is a list. Lists are useful for storing sequential data to be iterated over. For example, you can easily |