From: Armin Ronacher Date: Sun, 21 Oct 2007 20:15:04 +0000 (+0200) Subject: pp -> pretty X-Git-Tag: 2.0rc1~253 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5f3f136bd800dda68248370714e4c7a61fc11478;p=jinja2.git pp -> pretty --HG-- branch : trunk --- diff --git a/CHANGES b/CHANGES index e0153c5..77961d5 100644 --- a/CHANGES +++ b/CHANGES @@ -79,7 +79,7 @@ Version 1.2 - added `getattribute` and `getitem` filter. -- added support for the `pp` library. +- added support for the `pretty` library. Version 1.1 diff --git a/jinja/filters.py b/jinja/filters.py index a431e3d..7cd5e70 100644 --- a/jinja/filters.py +++ b/jinja/filters.py @@ -428,7 +428,7 @@ def do_pprint(verbose=False): Pretty print a variable. Useful for debugging. With Jinja 1.2 onwards you can pass it a parameter. If this parameter - is truthy the output will be more verbose (this requires `pp`) + is truthy the output will be more verbose (this requires `pretty`) """ def wrapped(env, context, value): return pformat(value, verbose=verbose) diff --git a/jinja/utils.py b/jinja/utils.py index 096afbc..9461990 100644 --- a/jinja/utils.py +++ b/jinja/utils.py @@ -352,12 +352,12 @@ del _test_singleton, _test_gen_bug def pformat(obj, verbose=False): """ - Prettyprint an object. Either use the `pp` library or the + Prettyprint an object. Either use the `pretty` library or the builtin `pprint`. """ try: - from pp import pp - return pp(obj, verbose=verbose) + from pretty import pretty + return pretty(obj, verbose=verbose) except ImportError: from pprint import pformat return pformat(obj)