Changed all sentences with occurrences of subscribing to a similar sentence that...
authorArmin Ronacher <armin.ronacher@active-4.com>
Wed, 25 Jun 2008 18:43:18 +0000 (20:43 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Wed, 25 Jun 2008 18:43:18 +0000 (20:43 +0200)
--HG--
branch : trunk

docs/templates.rst
jinja2/compiler.py
jinja2/nodes.py

index ac9c9a14089a913ea55bc3c02af1f150cf184d1f..9eb547da55cc90b0438d7d71371fbd0d8d993626 100644 (file)
@@ -59,7 +59,7 @@ too.  How a variable looks like, heavily depends on the application providing
 those.
 
 You can use a dot (``.``) to access attributes of a variable, alternative the
-so-called "subscribe" syntax (``[]``) can be used.  The following lines do
+so-called "subscript" syntax (``[]``) can be used.  The following lines do
 the same::
 
     {{ foo.bar }}
@@ -74,13 +74,12 @@ value.  What you can do with that kind of value depends on the application
 configuration, the default behavior is that it evaluates to an empty string
 if printed and that you can iterate over it, but every other operation fails.
 
-.. _notes-on-subscribing:
+.. _notes-on-subscriptions:
 
 .. admonition:: Implementation
 
-    The process of looking up attributes and items of objects is called
-    "subscribing" an object.  For convenience sake ``foo.bar`` in Jinja2
-    does the following things on the Python layer:
+    For convenience sake ``foo.bar`` in Jinja2 does the following things on
+    the Python layer:
 
     -   check if there is an attribute called `bar` on `foo`.
     -   if there is not, check if there is an item ``'bar'`` in `foo`.
index 75869cfdda7a72d309bb409e74f8d51c7fccf461..3edc5f80c9d375f13951045e10fd55e30bb4075e 100644 (file)
@@ -1274,7 +1274,7 @@ class CodeGenerator(NodeVisitor):
         self.write(', %r)' % node.attr)
 
     def visit_Getitem(self, node, frame):
-        # slices or integer subscriptions bypass the subscribe
+        # slices or integer subscriptions bypass the getitem
         # method if we can determine that at compile time.
         if isinstance(node.arg, nodes.Slice) or \
            (isinstance(node.arg, nodes.Const) and
index 59509209691516daaa40080f00d0ec903e87c020..56daae4a00e4a2de1408ce6ea1f8d0da93dcbf38 100644 (file)
@@ -316,7 +316,7 @@ class FromImport(Stmt):
     """A node that represents the from import tag.  It's important to not
     pass unsafe names to the name attribute.  The compiler translates the
     attribute lookups directly into getattr calls and does *not* use the
-    subscribe callback of the interface.  As exported variables may not
+    subscript callback of the interface.  As exported variables may not
     start with double underscores (which the parser asserts) this is not a
     problem for regular Jinja code, but if this node is used in an extension
     extra care must be taken.
@@ -583,9 +583,7 @@ class Call(Expr):
 
 
 class Getitem(Expr):
-    """Subscribe an expression by an argument.  This node performs a dict
-    and an attribute lookup on the object whatever succeeds.
-    """
+    """Get an attribute or item from an expression and prefer the item."""
     fields = ('node', 'arg', 'ctx')
 
     def as_const(self):
@@ -602,7 +600,9 @@ class Getitem(Expr):
 
 
 class Getattr(Expr):
-    """Subscribe an attribute."""
+    """Get an attribute or item from an expression that is a ascii-only
+    bytestring and prefer the attribute.
+    """
     fields = ('node', 'attr', 'ctx')
 
     def as_const(self):