What is considered an "advanced" topic in Python?

Rustom Mody rustompmody at gmail.com
Tue Jun 2 00:46:10 EDT 2015


On Monday, June 1, 2015 at 9:40:39 PM UTC+5:30, Chris Angelico wrote:
> On Tue, Jun 2, 2015 at 1:17 AM, BartC wrote:
> > On 01/06/2015 14:52, Chris Angelico wrote:
> >> It's
> >>
> >> like the eternal debate about assignment and whether "x = x + 1" is
> >> nonsense, with advocates preferring "x := x + 1" as being somehow
> >> fundamentally different. It isn't. It's just a notational change, and
> >> not even a huge one. (Though I do see the line of argument that it
> >> should be "x <- x + 1" or something else that looks like an arro'w.)
> >
> >
> > 'x <- x + 1' already means something as an expression (whether x is less
> > than (-x+1). 'x <= x + 1' has the same problem.
> >
> > But I have used "=>" before,  for left-to-right assignment. (Mostly I use
> > ":=")
> 
> In Python it does, yes; I'm talking about the language design
> advocates. Some recommend a two-character ASCII notation like "<-" or
> "<=", others prefer a single-character symbol eg "←" or "⇦", but
> whatever it is, it will have no meaning in that language other than
> assignment. And yes, I can see the value of using an arrow to indicate
> assignment... but I don't really see a huge problem with using "=" to
> mean assignment, given that people from a mathematical background will
> have to grok the entire concept of temporal truth anyway. Whatever
> symbol you use, it has to be explained.

Its not merely temporal truth but truth vs action and their wanton overloading.

In every (natural) language that I know (of)¹ declarative and imperative moods
are distinguished.  It does not require a PhD in English to see that
"Please sit down."
and
"It is raining."
differ in mood.
Imperative languages after Pascal (specially C and following) use a locution from
the one to denote a semantics in the other and make pickle of beginners' brains.

---------
¹ Except perhaps magic/mystic-speak wherein pronouncing a spell makes the heavens thunder.
Maybe I am just too old to have noticed that imperative programming is a paradigm of magic



More information about the Python-list mailing list