improved pprint

--HG--
branch : trunk
diff --git a/jinja/filters.py b/jinja/filters.py
index 9540f6d..a431e3d 100644
--- a/jinja/filters.py
+++ b/jinja/filters.py
@@ -423,12 +423,15 @@
     return wrapped
 
 
-def do_pprint():
+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`)
     """
     def wrapped(env, context, value):
-        return pformat(value)
+        return pformat(value, verbose=verbose)
     return wrapped
 
 
diff --git a/jinja/utils.py b/jinja/utils.py
index fe8c0ba..096afbc 100644
--- a/jinja/utils.py
+++ b/jinja/utils.py
@@ -350,16 +350,17 @@
 del _test_singleton, _test_gen_bug
 
 
-def pformat(obj):
+def pformat(obj, verbose=False):
     """
     Prettyprint an object.  Either use the `pp` library or the
     builtin `pprint`.
     """
     try:
-        from pp import pp as format
+        from pp import pp
+        return pp(obj, verbose=verbose)
     except ImportError:
-        from pprint import pformat as format
-    return format(obj)
+        from pprint import pformat
+        return pformat(obj)
 
 
 def buffereater(f):
@@ -419,7 +420,7 @@
 
     def __call__(self, env, context):
         """Print a nice representation of the context."""
-        return pformat(context.to_dict())
+        return pformat(context.to_dict(), verbose=True)
 
     def filters(self, env, context, builtins=True):
         """List the filters."""