]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Change attr filter example to match description 402/head
authorBrandon W Maister <quodlibetor@gmail.com>
Thu, 5 Feb 2015 19:49:30 +0000 (14:49 -0500)
committerBrandon W Maister <quodlibetor@gmail.com>
Thu, 5 Feb 2015 19:49:30 +0000 (14:49 -0500)
foo["bar"] is an item lookup, so saying that items are not looked
up with that as an example is confusing.

jinja2/filters.py

index 4ea5b0ac1cae143513ff486f44380ab263f2ccac..33bda42fa1d0d106a77d4dd471daf9ac51369daf 100644 (file)
@@ -778,7 +778,7 @@ def do_reverse(value):
 @environmentfilter
 def do_attr(environment, obj, name):
     """Get an attribute of an object.  ``foo|attr("bar")`` works like
-    ``foo["bar"]`` just that always an attribute is returned and items are not
+    ``foo.bar`` just that always an attribute is returned and items are not
     looked up.
 
     See :ref:`Notes on subscriptions <notes-on-subscriptions>` for more details.