diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-07-29 15:55:50 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-07-29 15:55:50 (GMT) |
commit | fbf66bd61705624f8c5b4b68061eeb9e5296a871 (patch) | |
tree | dc8f347a70433628412e8311d083828bc7854145 /Lib | |
parent | f63e343c39902e05a947320bb843a95e5b3d4535 (diff) | |
download | cpython-fbf66bd61705624f8c5b4b68061eeb9e5296a871.zip cpython-fbf66bd61705624f8c5b4b68061eeb9e5296a871.tar.gz cpython-fbf66bd61705624f8c5b4b68061eeb9e5296a871.tar.bz2 |
a much cleaner fix from Antoine
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/doctest.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py index e2b595e..e8babd2 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@ -1360,10 +1360,8 @@ class DocTestRunner: linecache.getlines = self.save_linecache_getlines if clear_globs: test.globs.clear() - if __name__ == "__main__": - __builtins__._ = None - else: - __builtins__['_'] = None + import builtins + builtins._ = None #///////////////////////////////////////////////////////////////// # Summarization |