Evil hack of the day

Barry A. Warsaw bwarsaw at cnri.reston.va.us
Thu May 27 11:10:47 EDT 1999


>>>>> "NK" == Neel Krishnaswami <neelk at brick.cswv.com> writes:

    NK> This approach misuses the default argument syntax, relies on
    NK> an implementation detail, *and* gratuitously exploits Python's
    NK> dynamism. The only way I can see to top it is to mess around
    NK> with the func_code attribute. (Now I just need to download
    NK> bytecodehacks....)

I think you win today's "FAST" award: Fascinating And Stomach
Turning[1].

:)

-Barry

[1] IIRC, coined at IPC7 in re: John Aycock's "Compiling Little
Languages in Python" implementation.

http://www.foretec.com/python/workshops/1998-11/proceedings/papers/aycock-little/aycock-little.html




More information about the Python-list mailing list