Skip to content
Myr

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

1 file+7 added−7 removed

modified:jinja2/utils.py+7 added-7 removed
65 unmodified lines
66 concat = _concat67 del _test_gen_bug, _error686970# 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.72try:73 next = next74except NameError:
56 unmodified lines
131 return f132133134def 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 lines
194 _lexer_cache.clear()195196197def 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 lines
411 def __getnewargs__(self):412 return (self.capacity,)413414 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 rv
41 unmodified lines
461 def __getitem__(self, key):462 """Get an item from the cache. Moves the item up so that it has the463 highest priority then.464465 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 lines
496 self._wlock.release()497498 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 lines
597598599# 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# release603try:604 from markupsafe import Markup, escape, soft_unicode605except ImportError:
15 unmodified lines