[Python-ideas] on colon ':', and some more

spir denis.spir at gmail.com
Thu Feb 13 12:52:35 CET 2014


On 02/13/2014 12:31 PM, Nick Coghlan wrote:
> For your footnote 3:
> http://python-history.blogspot.com.au/2011/07/karin-dewar-indentation-and-colon.html
> :)

Thank you!

> There may also be more in the papers about ABC:
> http://homepages.cwi.nl/~steven/abc/publications.html (I skimmed the
> "Issues in the Design of a Beginners' Programming Language"

Read it as well.

> [...]

>> Why is it instead not obvious in Python [6]?
>
> I don't know if Guido actually designed it this way, but if you
> evaluate Python's original syntax as "simple statements are based on
> C, compound statements are based on ABC", a lot of things make more
> sense (and then the rest of the language evolved from there). So if
> someone comes to Python having learned a language like C, C++ or Java
> first, then it is only the ABC inspired bits (especially the
> indentation based suites) that will puzzle them. If a new user learns
> Python as their first programming language, then it all seems
> arbitrary anyway, so they have no reason to expect anything different.

This perspective makes sense. Although for beginners, precisely, I think using 
',' is meaningful.

> It requires expectations calibrated in a different environment
> (perhaps including formal mathematics?) to make the C-style =/== model
> seem particularly strange. Mathematicians may also be puzzled by the
> use of "j" for complex numbers (although electrical engineers will
> find that notation entirely familiar).

Yes, 'j' is not weird at all for me ;-)
(background in automation, which also includes much of electrotechnics)

d


More information about the Python-ideas mailing list