Permalink
Browse files

Describe arguments for CachingCompiler.ast_parse

  • Loading branch information...
1 parent e783b1c commit ca3e756bf39180f748e89b3a19f66523f846b149 @takluyver committed Sep 12, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 IPython/core/compilerop.py
@@ -80,7 +80,10 @@ def __init__(self):
linecache.checkcache = self.check_cache
def ast_parse(self, source, filename='<unknown>', symbol='exec'):
- """Parse code to an AST with the current compiler flags active."""
+ """Parse code to an AST with the current compiler flags active.
+
+ Arguments are exactly the same as ast.parse (in the standard library),
+ and are passed to the built-in compile function."""
return compile(source, filename, symbol, self.flags | PyCF_ONLY_AST, 1)
def reset_compiler_flags(self):

0 comments on commit ca3e756

Please sign in to comment.