[llvm-commits] [llvm] r169222 - /llvm/trunk/utils/sort_includes.py

Chandler Carruth chandlerc at gmail.com
Tue Dec 4 02:52:41 PST 2012


On Tue, Dec 4, 2012 at 12:09 AM, Sean Silva <silvas at purdue.edu> wrote:

> Not that it's a big deal, but the "official" coding convention for
> Python <http://www.python.org/dev/peps/pep-0008/> uses 4-spaces. With
> significant whitespace I find that something a bit stronger than 2
> spaces is needed for keeping track of the start/end of blocks.
>

Meh, my editor does 2 space indent, so that's what i've used.


> Also you should be able to simplify the for-loop to
>
>     for i, l in enumerate(f):
>
> since iterating over a file automatically iterates over its lines.
>

Yea, I wanted the clarity of readlines -> temporary array -> writelines.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121204/c2dfd0a9/attachment.html>


More information about the llvm-commits mailing list