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:
Guido van Rossum 2007-02-09 23:20:19 +00:00
parent bdc36e4d9e
commit 79139b247b
19 changed files with 10 additions and 163 deletions

View file

@ -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.