mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
Kill off softspace completely (except in formatter.py which seems to have
a different feature with the same name). The change to test_doctest.txt reduces the doctest failures to 3.
This commit is contained in:
parent
bdc36e4d9e
commit
79139b247b
19 changed files with 10 additions and 163 deletions
16
Lib/code.py
16
Lib/code.py
|
@ -12,19 +12,6 @@ from codeop import CommandCompiler, compile_command
|
|||
__all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact",
|
||||
"compile_command"]
|
||||
|
||||
def softspace(file, newvalue):
|
||||
oldvalue = 0
|
||||
try:
|
||||
oldvalue = file.softspace
|
||||
except AttributeError:
|
||||
pass
|
||||
try:
|
||||
file.softspace = newvalue
|
||||
except (AttributeError, TypeError):
|
||||
# "attribute-less object" or "read-only attributes"
|
||||
pass
|
||||
return oldvalue
|
||||
|
||||
class InteractiveInterpreter:
|
||||
"""Base class for InteractiveConsole.
|
||||
|
||||
|
@ -105,9 +92,6 @@ class InteractiveInterpreter:
|
|||
raise
|
||||
except:
|
||||
self.showtraceback()
|
||||
else:
|
||||
if softspace(sys.stdout, 0):
|
||||
print()
|
||||
|
||||
def showsyntaxerror(self, filename=None):
|
||||
"""Display the syntax error that just occurred.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue