How coding in Python is bad for you

MRAB python at mrabarnett.plus.com
Tue Jan 24 08:03:24 EST 2017


On 2017-01-24 12:12, BartC wrote:
> On 24/01/2017 04:22, Steven D'Aprano wrote:
>> On Tuesday 24 January 2017 13:38, Chris Angelico wrote:
>>> On Tue, Jan 24, 2017 at 12:47 PM, BartC <bc at freeuk.com> wrote:
>
>>>> if 0 then
>>>>     print ("one")
>>>> print ("two")
>>>> endif
>
>>> My point is that you *assume* that showing just "three" is the correct
>>> behaviour. Why? Why do you automatically assume that the indentation
>>> is wrong and the endif is correct? All you have is that the two
>>> disagree.
>>
>> It's Bart's special language, so the correct behaviour is whatever he says it
>> is :-)
>
> I chose 'if...endif' above because it's used in a number of well-known
> languages. (Including PHP I think, while others use 'end if' or just
> 'end'. In my own language I prefer 'if...fi')
>
[snip]

PHP lets you use if...endif or braces.




More information about the Python-list mailing list