New submission from Raymond Hettinger <raymond.hettin...@gmail.com>:
The pprint() code has a number of type or protocol specific handlers but doesn't have one for dict views. So, we don't get pretty printing for the key(), values(), and items(): d = {i:i for i in range(100)} pprint(d) # This is handled correctly pprint(d.keys()) # Printed on one line pprint(d.values()) # Printed on one line pprint(d.items()) # Printed on one line ---------- components: Library (Lib) keywords: easy messages: 407513 nosy: rhettinger priority: normal severity: normal status: open title: Teach pprint about dict views type: enhancement versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45959> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com