r"""Compile a command and determine whether it is incomplete. Arguments: source -- the source string; may contain \n characters filename -- optional filename from which source was read; default " " symbol -- optional grammar start symbol; "
(self, source, filename="<input>", symbol="single")
| 182 | self.compiler = Compile() |
| 183 | |
| 184 | def __call__(self, source, filename="<input>", symbol="single"): |
| 185 | r"""Compile a command and determine whether it is incomplete. |
| 186 | |
| 187 | Arguments: |
| 188 | |
| 189 | source -- the source string; may contain \n characters |
| 190 | filename -- optional filename from which source was read; |
| 191 | default "<input>" |
| 192 | symbol -- optional grammar start symbol; "single" (default) or |
| 193 | "eval" |
| 194 | |
| 195 | Return value / exceptions raised: |
| 196 | |
| 197 | - Return a code object if the command is complete and valid |
| 198 | - Return None if the command is incomplete |
| 199 | - Raise SyntaxError, ValueError or OverflowError if the command is a |
| 200 | syntax error (OverflowError and ValueError can be produced by |
| 201 | malformed literals). |
| 202 | """ |
| 203 | return _maybe_compile(self.compiler, source, filename, symbol) |
| 204 | |
| 205 | |
| 206 | # END --------------------------- from codeop import CommandCompiler, compile_command |
nothing calls this directly
no test coverage detected