Striving for PEP-8 compliance

Duncan Booth duncan.booth at invalid.invalid
Sun Apr 11 12:19:04 CEST 2010


Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> wrote:

>> The same goes for indentation.  In python it's not possible to write
>> a program to correctly indent code that isn't alaready correctly
>> indented. 
> 
> The problem isn’t that it’s “incorrectly” indented, it’s two
> different pieces of code (correctly) indented according to two
> different conventions, and how you reconcile them without introducing
> logic errors into the code. 

You use 'reindent.py' which a standard part of every Python release.
Except that should shouldn't because it messes up the version history.

> 
>> In a brace delimited language it's not possible to write a program to
>> correctly place braces in an "incorrectly braced" program.
> 
> But with braces it’s easy enough to reconcile different indentation 
> conventions without introducing logic errors into the code.
> 
Except you shouldn't for the above mentioned reason.



More information about the Python-list mailing list