Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
codeop.CommandCompiler Class Reference

List of all members.

Public Member Functions

def __init__
def __call__

Public Attributes


Detailed Description

Instances of this class have __call__ methods identical in
signature to compile_command; the difference is that if the
instance compiles program text containing a __future__ statement,
the instance 'remembers' and compiles all subsequent program texts
with the statement in force.

Definition at line 139 of file

Constructor & Destructor Documentation

Definition at line 146 of file

00147     def __init__(self,):
00148         self.compiler = Compile()

Here is the caller graph for this function:

Member Function Documentation

def codeop.CommandCompiler.__call__ (   self,
  filename = "<input>",
  symbol = "single" 

Definition at line 149 of file

00150     def __call__(self, source, filename="<input>", symbol="single"):
00151         r"""Compile a command and determine whether it is incomplete.
00153         Arguments:
00155         source -- the source string; may contain \n characters
00156         filename -- optional filename from which source was read;
00157                     default "<input>"
00158         symbol -- optional grammar start symbol; "single" (default) or
00159                   "eval"
00161         Return value / exceptions raised:
00163         - Return a code object if the command is complete and valid
00164         - Return None if the command is incomplete
00165         - Raise SyntaxError, ValueError or OverflowError if the command is a
00166           syntax error (OverflowError and ValueError can be produced by
00167           malformed literals).
00168         """
00169         return _maybe_compile(self.compiler, source, filename, symbol)

Here is the call graph for this function:

Member Data Documentation

Definition at line 147 of file

The documentation for this class was generated from the following file: