[issue34798] pprint ignores the compact parameter for dicts

2018-09-25 Thread Nicolas Hug
Nicolas Hug added the comment: Thanks for the link, But I don't see any justification for this behavior*? Why should lists be compacted but not dicts (even when explicitly asked)? At the very least it should be made clear in the documentation that dicts are not compacted. * Maybe th

[issue34798] pprint ignores the compact parameter for dicts

2018-09-25 Thread Nicolas Hug
Nicolas Hug added the comment: Sorry: [2] https://github.com/scikit-learn/scikit-learn/pull/11705/files#diff-f83e8d9362766b385472f1be7fed9482R96 -- ___ Python tracker <https://bugs.python.org/issue34

[issue34798] pprint ignores the compact parameter for dicts

2018-09-25 Thread Nicolas Hug
Nicolas Hug added the comment: Thank you for the feedback! I'll try the python-ideas mail list. I posted a message on Python-list [1] a few weeks ago but it didn't get much traction. I'm not sure about what the final solution could be (if any), but I had to hack pprint mys

[issue34798] pprint ignores the compact parameter for dicts

2018-09-25 Thread Nicolas Hug
Change by Nicolas Hug : -- versions: +Python 3.8 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue34798> ___ ___ Python-bugs-list mailing list Unsub

[issue34798] pprint ignores the compact parameter for dicts

2018-09-25 Thread Nicolas Hug
New submission from Nicolas Hug : Dict representations that exceed the line width are printed with one line per key-value pair, ignoring the compact=True parameter: >>> pprint.pprint({i: 0 for i in range(15)}, compact=True) {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: