benjamin.peterson
2008-07-29 15:53:12 UTC
Author: benjamin.peterson
Date: Tue Jul 29 17:53:12 2008
New Revision: 65286
Log:
uhh. __builtins__ is a module in __main__ and a dict elsewhere
Modified:
python/branches/py3k/Lib/doctest.py
Modified: python/branches/py3k/Lib/doctest.py
==============================================================================
--- python/branches/py3k/Lib/doctest.py (original)
+++ python/branches/py3k/Lib/doctest.py Tue Jul 29 17:53:12 2008
@@ -1360,7 +1360,10 @@
linecache.getlines = self.save_linecache_getlines
if clear_globs:
test.globs.clear()
- __builtins__['_'] = None
+ if __name__ == "__main__":
+ __builtins__._ = None
+ else:
+ __builtins__['_'] = None
#/////////////////////////////////////////////////////////////////
# Summarization
Date: Tue Jul 29 17:53:12 2008
New Revision: 65286
Log:
uhh. __builtins__ is a module in __main__ and a dict elsewhere
Modified:
python/branches/py3k/Lib/doctest.py
Modified: python/branches/py3k/Lib/doctest.py
==============================================================================
--- python/branches/py3k/Lib/doctest.py (original)
+++ python/branches/py3k/Lib/doctest.py Tue Jul 29 17:53:12 2008
@@ -1360,7 +1360,10 @@
linecache.getlines = self.save_linecache_getlines
if clear_globs:
test.globs.clear()
- __builtins__['_'] = None
+ if __name__ == "__main__":
+ __builtins__._ = None
+ else:
+ __builtins__['_'] = None
#/////////////////////////////////////////////////////////////////
# Summarization