OT Signature quote [was Re: Unrecognized escape sequences in string literals]

MRAB python at mrabarnett.plus.com
Sun Aug 16 08:45:22 EDT 2009


Douglas Alan wrote:
[snip]
> C++ also allows for reading from stdin like so:
> 
>    cin >> myVar;
> 
> I think the direction of the arrows probably derives from languages
> like APL, which had notation something like so:
> 
>      myVar <- 3
>      [] <- myVar
> 
> "<-" was really a little arrow symbol (APL didn't use ascii), and the
> first line above would assign the value 3 to myVar. In the second
> line, the "[]" was really a little box symbol and represented the
> terminal.  Assigning to the box would cause the output to be printed
> on the terminal, so the above would output "3".  If you did this:
> 
>      [] -> myVar
> 
> It would read a value into myVar from the terminal.
> 
> APL predates Unix by quite a few years.
> 
No, APL is strictly right-to-left.

     -> x

means "goto x".

Writing to the console is:

     [] <- myVar

Reading from the console is:

     myVar <- []



More information about the Python-list mailing list