git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pretty printing dicts with compact=True


Is there a reason why the 'compact' parameter is ignored when pretty 
printing a dict? For example:

pprint({x: x for x in range(15)}, compact=True)

would be be printed in 15 lines while it could fit on 2.


Is this a bug or was this decided on purpose?

Thank you!