Obfuscated Python hack

Steven D'Aprano steve+comp.lang.python at pearwood.info
Mon Jun 2 11:38:32 EDT 2014


On Mon, 02 Jun 2014 23:23:53 +1000, Chris Angelico wrote:

> On Mon, Jun 2, 2014 at 10:27 PM, Tim Chase
> <python.list at tim.thechases.com> wrote:
>> Stripping off the exec() call makes it pretty transparent that you're
>> attempting (successfully on some platforms) to set the value of "4" to
>> "5".  But a cute hack.
> 
> And not on Windows inside IDLE, where attempting to use 4 results in a
> ===== RESTART ===== crash. 

Sounds like a bug in IDLE.

What happens if you try it in Windows without IDLE, just using the 
standard interactive interpreter?



-- 
Steven D'Aprano
http://import-that.dreamwidth.org/



More information about the Python-list mailing list