The "loop and a half"

Chris Angelico rosuav at gmail.com
Thu Oct 5 03:11:51 EDT 2017


On Thu, Oct 5, 2017 at 5:59 PM, Peter Otten <__peter__ at web.de> wrote:
>>   This dictates that Python code cannot be indented
>>   in posts to differentiate it from the natural-language
>>   body of the post. Therefore, it's rather the
>>   natural-language body that has to be indented.
>
> That appears compelling. Can you find a flaw in the logic?
>

It assumes that the Python code and the English code are completely
independent. If they are not, and if (as is very common) the Python is
logically nested inside the English, then according to the rules of
both languages, the Python code should be indented.

ChrisA



More information about the Python-list mailing list