From: David Goodger <goodger@us...> - 2003-07-28 14:55:34
Update of /cvsroot/docutils/docutils
In directory sc8-pr-cvs1:/tmp/cvs-serv21648
RCS file: /cvsroot/docutils/docutils/FAQ.txt,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- FAQ.txt 28 Jul 2003 14:40:47 -0000 1.14
+++ FAQ.txt 28 Jul 2003 14:55:31 -0000 1.15
@@ -479,6 +479,19 @@
`HappyDoc <http://happydoc.sourceforge.net/>`_, which doesn't support
+The advantages of parsing over importing are security and flexibility;
+the disadvantage is complexity/difficulty.
+* Security: untrusted code that shouldn't be executed can be parsed;
+ importing a module executes its top-level code.
+* Flexibility: comments and unofficial docstrings (those not supported
+ by Python syntax) can only be processed by parsing.
+* Complexity/difficulty: it's a lot harder to parse and analyze a
+ module than it is to ``import`` and analyze one.
+For more details, please see "Docstring Extraction Rules" in `PEP
+258`_, item 3 ("How").
Get latest updates about Open Source Projects, Conferences and News.