[Python-ideas] Making colons optional? Syntactic alternative.

Andre Roberge andre.roberge at gmail.com
Thu Feb 5 20:53:35 CET 2009

On Thu, Feb 5, 2009 at 3:33 PM, Chris Rebert <pyideas at rebertia.com> wrote:
> The other somewhat popular choices of assignment syntax that I've seen
> are x := y, x <- y, and let x = y. The first and last of those still
> use a =, albeit with something extra, and so aren't too much of a
> stretch. x <- y is particularly deviant and isn't readable (as in read
> it out loud) IMHO; you either have to read it right-to-left (which is
> unnatural) as "Take y and put it into x", or as "x has y placed into
> it" (which uses the passive voice and so does not fit well with an
> imperative language.

Furthermore, the "take y and put it into x" might be an appropriate
interpretation for C but not for Python.  For Python it should be
instead something like
"Assign the name x to object y" which could be visually represented by
x -> y    instead of x <- y as you mention.


> Cheers,
> Chris
> --
> Follow the path of the Iguana...
> http://rebertia.com
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas

More information about the Python-ideas mailing list