Suggestion/recommendation for dictionary formatting

John D. lists at webcrunchers.com
Sun Aug 24 20:59:06 EDT 2003


I've experimented with this and concluded:

{1:2, 3:4, 5:6, 7:8}

is more readable than the current output:

{1: 2, 3: 4, 5: 6, 7: 8}

Removing the space after the colon more clearly 
shows the key:value pairings. The effect is less striking
with longer and more complex items, but it is never detrimental.

Summary of proposed change:
---------------------------
Synopsis: Remove space after the colon in formatted dictionary dumps
Purpose: Legibility improvement
Effect on existant programs: Minimal -this is mostly cosmetic
Difficulty of implementation: Trivial for one familiar with core code
Security issues: None

Comments anyone?

John







More information about the Python-list mailing list