the.bay.news

reprlib.Repr should have a sort_dicts parameter

Discussions on Python.org
reprlib.Repr should have a sort_dicts parameter
Python dicts preserve insertion order since 3.6 and this is behavior is guaranteed since 3.7. This order can carry meaningful information. reprlib currently discards this information even when the caller only wants its size-limiting and recursive representation features. Proposal: Add a sort_dicts parameter to reprlib.Repr, defaulting to True for backward compatibility: repr = reprlib.Repr(sort_dicts=False) When False, dictionary entries should be represented in their native iteration orde...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.