Mercurial > python-for-js-programmers
changeset 48:852f069c23b7
Revised the statement about semicolons as suggested by Paul Boddie.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Tue, 10 Jun 2008 23:15:17 -0700 |
parents | acb80c6abaa8 |
children | d3f486bfd354 |
files | PythonForJsProgrammers.txt |
diffstat | 1 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/PythonForJsProgrammers.txt Tue Jun 10 23:09:08 2008 -0700 +++ b/PythonForJsProgrammers.txt Tue Jun 10 23:15:17 2008 -0700 @@ -75,11 +75,14 @@ else: doOtherThing() -Also note that Python doesn't use semicolons, which is yet another -language feature that reduces the cognitive burden on the programmer. -Indeed, many of the language features covered below were designed with -a very careful eye towards readability, reducing cognitive load, and -making the process of programming `as enjoyable as possible`_. +Python is technically like JavaScript in that semicolons are optional, +but its community prescribes the opposite convention: that is, +semicolons should *never* be used to delimit statements unless +absolutely necessary. This is yet another decision that reduces the +cognitive burden on the programmer; indeed, many of the language +features covered below were designed with a very careful eye towards +readability, reducing cognitive load, and making the process of +programming `as enjoyable as possible`_. .. _`Don't Repeat Yourself`: http://en.wikipedia.org/wiki/Don%27t_repeat_yourself .. _`as enjoyable as possible`: http://xkcd.com/353/