An interesting beginner question: why we need colon at all in the python language?

Chris Angelico rosuav at gmail.com
Wed Jul 13 09:11:41 EDT 2011


On Wed, Jul 13, 2011 at 11:03 PM, Grant Edwards <invalid at invalid.invalid> wrote:
> You would think so, but human readers like redundancy.
>

One of the benefits of redundancy is error-trapping. If you see a list
of numbers like this:

   40
   14
   24
   56
   48
   12
   60
   16
=====
  269

then you know the result can't be right, because they're all even
numbers and the total isn't. The redundancy of having both the string
of numbers and the total adds only a small amount to the transmission
requirement, but it adds a lot to the reliability of transfer.

ChrisA



More information about the Python-list mailing list