On 01/10/2014 18:00, Steven D'Aprano wrote:
Out of curiosity, I ran:
globals().clear()
in the interactive interpreter. It broke much more than I expected!
Built-ins were no longer available, and import stopped working.
Interesting... :D
Obviously the easiest way to recover is to exit the current session and
restart it, but as a challenge, can we recover from this state?
>>> [].__class__.__module__ # It is a string...
'__builtin__'
So, I do not have any idea about how to get a module without importing
something. Thanks for sharing :)
--
Marco Buttu
INAF-Osservatorio Astronomico di Cagliari
Via della Scienza n. 5, 09047 Selargius (CA)
Phone: 070 711 80 217
Email: mbu...@oa-cagliari.inaf.it
--
https://mail.python.org/mailman/listinfo/python-list