An interesting beginner question: why we need colon at all in the python language?
invalid at invalid.invalid
Wed Jul 13 15:03:22 CEST 2011
On 2011-07-13, Thorsten Kampe <thorsten at thorstenkampe.de> wrote:
>> and that that block is to be considered in relation to what was just
>> said, before the colon.
> The indentation makes it abundantly clear to the human reader that
> that indented block is to be considered in relation to what was just
> said, before the indentation.
You would think so, but human readers like redundancy.
Most natural human languages have plenty of redundancy. For example
in English when speaking of multiple subjects one not only uses a
plural noun or pronoun (e.g. "they" rather than "him"), but one also
uses a plural verb ("run" rather than "runs") even though the plural
noun alone should make it abundantly clear to the human reader than
we're talking about more than one person. The same holds true for
objective and subjective case: the position of the noun in the
sentence makes it abundantly clear whether the noun is an object or a
subject, yet we still often have two cases (it's "I run" rather than
Grant Edwards grant.b.edwards Yow! I'm having an
at EMOTIONAL OUTBURST!! But,
gmail.com uh, WHY is there a WAFFLE
in my PAJAMA POCKET??
More information about the Python-list