Striving for PEP-8 compliance

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sun Apr 11 05:44:37 EDT 2010


In message <hppue2$g7h$1 at reader1.panix.com>, Grant Edwards wrote:

> On 2010-04-10, Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand>
> wrote:
>
>> In message <hpokef$gvg$1 at reader1.panix.com>, Grant Edwards wrote:
>>
>>> On 2010-04-10, Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand>
>>> wrote:
>>>
>>>> In message <hpoh5j$35j$1 at reader1.panix.com>, Grant Edwards wrote:
>>>>
>>>>> Anybody who invents another brace-delimited language should be beaten.
>>>>> You always end up with a big problem trying to make sure the braces
>>>>> are consistent with the program logic.
>>> 
>>>> Would you prefer “begin” and “end” word symbols, then?
>>> 
>>> Nope, I categorize those as nothing more than verbose "braces".
>>
>> But since those symbols already, by definition, directly correspond to
>> program logic, where exactly does the “big problem” arise trying to make
>> sure they are “consistent with the program logic”?
> 
> 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.

> 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.



More information about the Python-list mailing list