summaryrefslogtreecommitdiff
path: root/src/jinja2/optimizer.py
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2020-01-10 13:42:02 -0800
committerDavid Lord <davidism@gmail.com>2020-01-10 13:42:02 -0800
commit51c1c8efa6f4cd3d4eff270f8c3ceb20362af7bb (patch)
tree136e569e5ebbba2d43485aca181b07438eac6412 /src/jinja2/optimizer.py
parente492255f270add52d051ef4f8e87899f40e57687 (diff)
downloadjinja2-style.tar.gz
simplify module docstringsstyle
Diffstat (limited to 'src/jinja2/optimizer.py')
-rw-r--r--src/jinja2/optimizer.py24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/jinja2/optimizer.py b/src/jinja2/optimizer.py
index e262727..7bc78c4 100644
--- a/src/jinja2/optimizer.py
+++ b/src/jinja2/optimizer.py
@@ -1,20 +1,12 @@
# -*- coding: utf-8 -*-
-"""
- jinja2.optimizer
- ~~~~~~~~~~~~~~~~
-
- The jinja optimizer is currently trying to constant fold a few expressions
- and modify the AST in place so that it should be easier to evaluate it.
-
- Because the AST does not contain all the scoping information and the
- compiler has to find that out, we cannot do all the optimizations we
- want. For example loop unrolling doesn't work because unrolled loops would
- have a different scoping.
-
- The solution would be a second syntax tree that has the scoping rules stored.
-
- :copyright: (c) 2017 by the Jinja Team.
- :license: BSD.
+"""The optimizer tries to constant fold expressions and modify the AST
+in place so that it should be faster to evaluate.
+
+Because the AST does not contain all the scoping information and the
+compiler has to find that out, we cannot do all the optimizations we
+want. For example, loop unrolling doesn't work because unrolled loops
+would have a different scope. The solution would be a second syntax tree
+that stored the scoping rules.
"""
from . import nodes
from .visitor import NodeTransformer