Skip to content

Commit

Permalink
uhh. __builtins__ is a module in __main__ and a dict elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminp committed Jul 29, 2008
1 parent 638c722 commit f63e343
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lib/doctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,10 @@ def run(self, test, compileflags=None, out=None, clear_globs=True):
linecache.getlines = self.save_linecache_getlines
if clear_globs:
test.globs.clear()
__builtins__['_'] = None
if __name__ == "__main__":
__builtins__._ = None
else:
__builtins__['_'] = None

#/////////////////////////////////////////////////////////////////
# Summarization
Expand Down

0 comments on commit f63e343

Please sign in to comment.