Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Python

Name: Anonymous 2011-03-05 18:21

You can't put a single backslash at the end of a r"" string:

>>> print("\abc")
bc
(causes terminal to beep)
>>> print(r"\abc")
\abc
>>> print(r"abc\\")
abc\\
>>> print(r"abc\")
  File "<stdin>", line 1
    print(r"abc\")
                  ^
SyntaxError: EOL while scanning string literal


Fuck!

[b]\abc[/b] produces \abc
[b]abc\\[/b] produces [b]abc\[/b]
[b]abc\[/b] produces [b]abc[/b]

Python is as stupid as Shitchan!

Name: Anonymous 2011-03-06 11:08

>>13
You're crazy, stupid or trolling. He isn't asking what lexical scoping is, he is asking how the scoping in Scheme differs from that in Python. Python changed to its current scoping with nested scopes in 2.2, released in 2001 (you could also import it in 2.1). You can't possibly think Guido doesn't know basic scoping terminology after that.
Looking at the post, this is part of the discussion that lead to the introduction of the nonlocal keyword. Before that you had to do some trickery to assign to variables in outer scopes.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List