Author dmi.baranov
Recipients dmi.baranov
Date 2013-04-29.10:15:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1367230523.7.0.186873626934.issue17867@psf.upfronthosting.co.za>
In-reply-to
Content
Simple case - let's delete __import__ and try to import anything

$ python3.3
Python 3.3.0 (default, Oct  7 2012, 11:03:52) 
[GCC 4.4.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> del __builtins__.__dict__['__import__']
>>> import os
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Fatal Python error: __import__ missing

Current thread 0x00007f07c9ebc700:
Aborted

But in python2.x

$ python2.7
Python 2.7.3 (default, Sep 22 2012, 02:37:18) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> del __builtins__.__dict__['__import__']
>>> import os
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: __import__ not found
>>>
History
Date User Action Args
2013-04-29 10:15:23dmi.baranovsetrecipients: + dmi.baranov
2013-04-29 10:15:23dmi.baranovsetmessageid: <1367230523.7.0.186873626934.issue17867@psf.upfronthosting.co.za>
2013-04-29 10:15:23dmi.baranovlinkissue17867 messages
2013-04-29 10:15:23dmi.baranovcreate