On 3/15/12 2:30 PM, Kiuhnm wrote:
On 3/15/2012 15:23, Duncan Booth wrote:
Kiuhnm<kiuhnm03.4t.yahoo.it> wrote:

BTW, aren't those ':' redundant?


They are required by the grammar, but in a sense you are correct. You could
modify Python's grammar to make the colons optional and still keep it
unambiguous but that would make it harder for other tools (such as text
editors or indeed humans) to understand.

Sorry, but I can't see how it would make it harder for humans to understand. Are
there particular situations you're referring to?

There were usability studies done on one of Python's indentation-based ancestors, ABC. Those studies found, empirically, that having the colons helped people read and understand the code faster.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to