Discussion:
[Python-3000-checkins] r65287 - python/branches/py3k/Lib/doctest.py
benjamin.peterson
2008-07-29 15:55:50 UTC
Permalink
Author: benjamin.peterson
Date: Tue Jul 29 17:55:50 2008
New Revision: 65287

Log:
a much cleaner fix from Antoine

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:55:50 2008
@@ -1360,10 +1360,8 @@
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

Loading...