homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Tyler.Crompton
Recipients Tyler.Crompton
Date 2012年07月18日.05:08:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1342588122.88.0.602543010606.issue15383@psf.upfronthosting.co.za>
In-reply-to
Content
Doing one of the following crashes Python.
 del __builtins__
 a{Tab}
or
 builtins = __builtins__
 del __builtins__
 a{Tab}
If you do a print screen, immediately, you will see the following error:
 *** Internal Error: rpc.py:SocketIO.localcall()
 Object: exec
 Method: <bound method Executive.get_the_completion_list of <idlelib.run.Executive object at 0x0000000002DC2710>>
 Args: ('', 1)
 Traceback (most recent call last):
 File "C:\Python32\lib\idlelib\rpc.py", line 188, in localcall
 ret = method(*args, **kwargs)
 File "C:\Python32\lib\idlelib\run.py", line 327, in get_the_completion_list
 return self.autocomplete.fetch_completions(what, mode)
 File "C:\Python32\lib\idlelib\AutoComplete.py", line 189, in fetch_completions
 namespace.update(__main__.__builtins__.__dict__)
AttributeError: 'module' object has no attribute '__builtins__'
Additionally, when __builtins__ is deleted (in IDLE), __builtins__ becomes a dictionary. If one were to then do __builtins__.clear(), the interpreter stops all interpreting. IDLE moreorless becomes a text editor with syntax highlighting. If you try to use autocomplete, Python hangs before crashing.
I realize that doing such is pointless, but it behaves differently than interactive console interpreters. Interactive console interpreters don't convert __builtins__ to a dictionary upon its deletion. I feel that this error can be handled to prevent crashing.
History
Date User Action Args
2012年07月18日 05:08:42Tyler.Cromptonsetrecipients: + Tyler.Crompton
2012年07月18日 05:08:42Tyler.Cromptonsetmessageid: <1342588122.88.0.602543010606.issue15383@psf.upfronthosting.co.za>
2012年07月18日 05:08:42Tyler.Cromptonlinkissue15383 messages
2012年07月18日 05:08:40Tyler.Cromptoncreate

AltStyle によって変換されたページ (->オリジナル) /