Created
October 19, 2013 18:11
-
-
Save jorgenschaefer/7059409 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def foo(): | |
| print 23 | |
| # Now an empty line. In a REPL, Python does not know if the user | |
| # finished the definition of the function foo, or if it will | |
| # continue. So it assumes the empty line terminates the current | |
| # open code block. | |
| # In the REPL, this would now cause a "bad indentation" error, | |
| # because the definition of foo() ended above. In an actual | |
| # program, this works. | |
| print 17 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment