diff options
author | Guido van Rossum <guido@python.org> | 1997-03-19 14:43:28 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-03-19 14:43:28 (GMT) |
commit | 14d1c721d57016e8fb898e50a7f8cc95315e6c04 (patch) | |
tree | 926c0efa1cd13182dc9ff1e9c78543e314d2121c | |
parent | 4a908be231e50eb319f2763394b8a5f4cf7730e8 (diff) | |
download | cpython-14d1c721d57016e8fb898e50a7f8cc95315e6c04.zip cpython-14d1c721d57016e8fb898e50a7f8cc95315e6c04.tar.gz cpython-14d1c721d57016e8fb898e50a7f8cc95315e6c04.tar.bz2 |
Added note about adding \n to source for exec and compile.
-rw-r--r-- | Misc/FAQ | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -181,6 +181,7 @@ Here's an overview of the questions per chapter: 4.40. Q. I try to use __spam and I get an error about _SomeClassName__spam. 4.41. Q. How do I delete a file? And other file questions. 4.42. Q. How to modify urllib or httplib to support HTTP/1.1? + 4.43. Q. Unexplicable syntax errors in compile() or exec. 5. Extending Python 5.1. Q. Can I create my own functions in C? @@ -1700,6 +1701,12 @@ A. Apply the following patch to httplib.py: --- > replypat = regsub.gsub('\\.', '\\\\.', 'HTTP/1.[0-9]+') + \ +4.43. Q. Unexplicable syntax errors in compile() or exec. + +A. When a statement suite (as opposed to an expression) is compiled by +compile(), exec or execfile(), it *must* end in a newline. In some +cases, when the source ends in an indented block it appears that at +least two newlines are required. 5. Extending Python |