changeset 478:565a2241289b stable-0.4.x

Ported [576] to 0.4.x.
author cmlenz
date Mon, 14 May 2007 20:28:47 +0000
parents 2f54482aa019
children 06c639eda872
files doc/templates.txt
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/doc/templates.txt
+++ b/doc/templates.txt
@@ -178,8 +178,8 @@
 Because there are two ways to access either attributes or items, expressions
 do not raise the standard ``AttributeError`` or ``IndexError`` exceptions, but
 rather an exception of the type ``UndefinedError``. The same kind of error is
-raised when you try to access a top-level variable that is not in the context
-data.
+raised when you try to use a top-level variable that is not in the context data.
+See `Error Handling`_ below for details on how such errors are handled.
 
 
 .. _`code blocks`:
@@ -211,10 +211,14 @@
 .. note:: Using the ``print`` statement will print to the standard output
           stream, just as it does for other Python code in your application.
 
-This feature is not supposed to encourage mixing application code into
-templates, which is generally considered bad design. If you're using many code
-blocks, that me be a sign that you should move such code into separate Python
-modules.
+Unlike expressions, Python code in ``<?python ?>`` processing instructions can
+not use item and attribute access in an interchangeable manner. That means that
+“dotted notation” is always attribute access, and vice-versa.
+
+The support for Python code blocks in templates is not supposed to encourage
+mixing application code into templates, which is generally considered bad
+design. If you're using many code blocks, that may be a sign that you should
+move such code into separate Python modules.
 
 .. note:: Code blocks are not currently supported in text templates.
 
Copyright (C) 2012-2017 Edgewall Software