mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
uhh. __builtins__ is a module in __main__ and a dict elsewhere
This commit is contained in:
parent
638c722228
commit
f63e343c39
1 changed files with 4 additions and 1 deletions
|
@ -1360,6 +1360,9 @@ class DocTestRunner:
|
||||||
linecache.getlines = self.save_linecache_getlines
|
linecache.getlines = self.save_linecache_getlines
|
||||||
if clear_globs:
|
if clear_globs:
|
||||||
test.globs.clear()
|
test.globs.clear()
|
||||||
|
if __name__ == "__main__":
|
||||||
|
__builtins__._ = None
|
||||||
|
else:
|
||||||
__builtins__['_'] = None
|
__builtins__['_'] = None
|
||||||
|
|
||||||
#/////////////////////////////////////////////////////////////////
|
#/////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue