Tabs versus Spaces in Source Code ('semantic' vs. arbitrary indentation)

glomde tbrkic at yahoo.com
Wed May 17 23:01:41 CEST 2006


> But generally, I don't do layout like that. I'd do:
>
>    --->cursor.execute(
>    --->--->--->'select id, item, amount, field4, <etc>
>    --->--->--->'from table1 where amount>100'
>    --->)
>
>Which keeps looking fine, no matter what tab size, and without mixing
>tabs and spaces.
>
Which only works fine only if you are the one only editing the file.
But If you work in a team it is kind of hard to make sure that
everybody use tabs and not spaces. And it is not very easy to spot
either. The same is valid if somebody use your code or you
want to import somebody elses code.




More information about the Python-list mailing list