Re:Google Python Style Guide
by sigzero on Saturday May 01, 2010 @06:44PM
(#1311366)
Within each grouping, imports should be sorted lexicographically, ignoring case, according to each module's full package path.
That seems kind of time consuming...
[ Parent
| on HN ]
Some text editors have a function for sorting text in-place. Vim does, and I assume Emacs does too.
Sorting makes it easier to recognize a common grouping of imports (e.g. some recurring functionality that requires three particular modules) without inspecting the words carefully.