Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 208ca70

Browse files
committed
Repair some out-of-date comments.
1 parent bb43147 commit 208ca70

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

Lib/doctest.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,10 +1279,7 @@ def __run(self, test, compileflags, out):
12791279
# any exception that gets raised. (But don't intercept
12801280
# keyboard interrupts.)
12811281
try:
1282-
# If the example is a compound statement on one line,
1283-
# like "if 1: print 2", then compile() requires a
1284-
# trailing newline. Rather than analyze that, always
1285-
# append one (it never hurts).
1282+
# Don't blink! This is where the user's code gets run.
12861283
exec compile(example.source, "<string>", "single",
12871284
compileflags, 1) in test.globs
12881285
exception = None
@@ -1291,10 +1288,7 @@ def __run(self, test, compileflags, out):
12911288
except:
12921289
exception = sys.exc_info()
12931290

1294-
# Extract the example's actual output from fakeout, and
1295-
# write it to `got`. Add a terminating newline if it
1296-
# doesn't have already one.
1297-
got = self._fakeout.getvalue()
1291+
got = self._fakeout.getvalue() # the actual output
12981292
self._fakeout.truncate(0)
12991293

13001294
# If the example executed without raising any exceptions,

0 commit comments

Comments
 (0)