File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ A new argument to built-in ``print``
8383Built-in :func: `print ` takes a new optional argument, appended to the end of the argument list, called
8484``pretty ``, which can take one of the following values:
8585
86- * ``None `` - the default; fully backward compatible
86+ * ``None `` - the default. No pretty printing is invoked. Fully backward compatible
8787* ``True `` - use a temporary instance of the :py:class: `python:pprint.PrettyPrinter ` class to get a
8888 pretty representation of the object.
8989* An instance with a ``pformat() `` method, which has the same signature as
@@ -103,7 +103,8 @@ A custom ``__pprint__()`` method can be used to customize the representation of
103103 >>> class Custom:
104104 ... def __str__(self): return 'my str'
105105 ... def __repr__(self): return 'my repr'
106- ... def __pprint__(self, context, maxlevels, level): return 'my pprint'
106+ ... def __pprint__(self, context, maxlevels, level):
107+ ... return 'my pprint', False, False
107108
108109 >>> pprint.pp(Custom())
109110 my pprint
You can’t perform that action at this time.
0 commit comments