This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bob.ippolito
Recipients bob.ippolito, dhimmel, ezio.melotti, methane, r.david.murray, rhettinger, serhiy.storchaka
Date 2017-03-16.18:21:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Probably the best thing we could do here is to mirror the options available in similar tools, such as jq:

The relevant options here would be:


The default indent in jq is 2, which I tend to prefer these days, but maybe 4 is still appropriate given PEP 8:

    $ echo '[{}, {"a": "b"}, 2, 3, 4]' | jq
        "a": "b"

This is how jq interprets --compact-output:

    $ echo '[{}, {"a": "b"}, 2, 3, 4]' | jq --compact-output

I do not think that it's worth having the command-line tool cater to people that want to indent in other ways (e.g. using a string that isn't all spaces or a single tab).
Date User Action Args
2017-03-16 18:21:20bob.ippolitosetrecipients: + bob.ippolito, rhettinger, ezio.melotti, r.david.murray, methane, serhiy.storchaka, dhimmel
2017-03-16 18:21:20bob.ippolitosetmessageid: <>
2017-03-16 18:21:20bob.ippolitolinkissue29636 messages
2017-03-16 18:21:20bob.ippolitocreate