Merge pull request #95 from florentx/patch-2
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Few typos in jinja2.utils
authored by Ron DuPlain · committed by Ron DuPlain · parents 99b2285, 0ec4f76 · Browse files · 1 file·+7 added−7 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+7 added−7 removed
- other:+7 added−7 removed
Provenance
- Commit
a0eabdd- Tree
14fe07a- Author
Ron DuPlain <ron.duplain@gmail.com>- Committer
Ron DuPlain <ron.duplain@gmail.com>- Parent 1
99b2285- Parent 2
0ec4f76
1 file changed+7 added−7 removed
modified:jinja2/utils.py+7 added-7 removed
65 unmodified lines66 concat = _concat67 del _test_gen_bug, _error68 69 70-# for python 2.x we create outselves a next() function that does the70+# for python 2.x we create ourselves a next() function that does the71 # basics without exception catching.72 try:73 next = next74 except NameError:56 unmodified lines131 return f132 133 134 def evalcontextfunction(f):135- """This decoraotr can be used to mark a function or method as an eval135+ """This decorator can be used to mark a function or method as an eval136 context callable. This is similar to the :func:`contextfunction`137 but instead of passing the context, an evaluation context object is138 passed. For more information about the eval context, see139 :ref:`eval-context`.54 unmodified lines194 _lexer_cache.clear()195 196 197 def import_string(import_name, silent=False):198- """Imports an object based on a string. This use useful if you want to198+ """Imports an object based on a string. This is useful if you want to199 use import paths as endpoints or something similar. An import path can200 be specified either in dotted notation (``xml.sax.saxutils.escape``)201 or with a colon as object delimiter (``xml.sax.saxutils:escape``).202 208 unmodified lines411 def __getnewargs__(self):412 return (self.capacity,)413 414 def copy(self):415- """Return an shallow copy of the instance."""415+ """Return a shallow copy of the instance."""416 rv = self.__class__(self.capacity)417 rv._mapping.update(self._mapping)418 rv._queue = deque(self._queue)419 return rv41 unmodified lines461 def __getitem__(self, key):462 """Get an item from the cache. Moves the item up so that it has the463 highest priority then.464 465- Raise an `KeyError` if it does not exist.465+ Raise a `KeyError` if it does not exist.466 """467 rv = self._mapping[key]468 if self._queue[-1] != key:469 try:26 unmodified lines496 self._wlock.release()497 498 def __delitem__(self, key):499 """Remove an item from the cache dict.500- Raise an `KeyError` if it does not exist.500+ Raise a `KeyError` if it does not exist.501 """502 self._wlock.acquire()503 try:504 del self._mapping[key]92 unmodified lines597 598 599 # try markupsafe first, if that fails go with Jinja2's bundled version600 # of markupsafe. Markupsafe was previously Jinja2's implementation of601-# the Markup object but was moved into a separate package in a patchleve601+# the Markup object but was moved into a separate package in a patchlevel602 # release603 try:604 from markupsafe import Markup, escape, soft_unicode605 except ImportError:15 unmodified lines