| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
with an indented code block but no newline would raise SyntaxError.
This would have been a four-line change in parsetok.c... Except
codeop.py depends on this behavior, so a compilation flag had to be
invented that causes the tokenizer to revert to the old behavior;
this required extra changes to 2 .h files, 2 .c files, and 2 .py
files. (Fixes SF bug #501622.)
|
| |
|
| |
|
|
|
|
|
|
| |
readline and get rid of string exception fallback when showing syntax
errors.
see bug 411881
|
|
|
|
| |
upon attempted attribute assignment. Caught by MWH, SF bug #462522.
|
|
|
|
|
| |
#449043 supporting __future__ in simulated shells
which implements PEP 264.
|
|
|
|
|
| |
When replacing the exception object, be sure we stuff the new value
in sys.last_value (which we already did for the original value).
|
| |
|
|
|
|
|
|
|
|
| |
added test script and expected output file as well
this closes patch 103297.
__all__ attributes will be added to other modules without first submitting
a patch, just adding the necessary line to the test script to verify
more-or-less correct implementation.
|
|
|
|
| |
Its base class ValueError can be raised too, so catch that.
|
| |
|
| |
|
|
|
|
| |
"most recent call last").
|
|
|
|
| |
docstrings into comments.
|
| |
|
|
|
|
| |
for b/w compatibility with 1.5.1.
|
|
|
|
|
|
|
|
|
|
| |
InteractiveInterpreter, which handles parsing and interpreter state
but doesn't know deal with buffering or prompting or input file
naming. And a derived class, InteractiveConsole, which adds buffering
and prompting and supports setting the filename once. Also tweak the
algorithm in compile_command() a bit so that input consisting of all
blank lines or comments always succeeds immediately, and note the fact
that apart from SyntaxError it can also raise OverflowError.
|
|
|
|
|
| |
possible to use this in PythonWin, and to replace Fredrik Lundh's
PythonInterpreter class. Fredrik is credited with the class' API.
|
| |
|
| |
|
|
|
|
| |
(It should probably be withdrawn :-( )
|
|
Currently, contains one function: compile_command(), which helps
determining whether a source string is complete, incomplete or in
error. This is useful when writing your own version of the Python
read-eval-print loop.
|