]> granicus.if.org Git - python/commitdiff
Added note about adding \n to source for exec and compile.
authorGuido van Rossum <guido@python.org>
Wed, 19 Mar 1997 14:43:28 +0000 (14:43 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 19 Mar 1997 14:43:28 +0000 (14:43 +0000)
Misc/FAQ

index c18f45b0d344b9f5a7be8f58f719e21afcc98097..8bd9991523c8db8064adb4659d8df52052719681 100644 (file)
--- a/Misc/FAQ
+++ b/Misc/FAQ
@@ -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