Print your own code.

François Pinard pinard at iro.umontreal.ca
Sun Sep 19 10:44:29 EDT 1999


nascheme at ucalgary.ca (Neil Schemenauer) writes:

> >I heard that it's possible to write a python script that prints
> >it's own source... is that true? How?

> That is an old trick.  I believe it can be done in almost any
> language.

There is an old theorem by Kleene about this (the fixed-point theorem).  Gosh,
this is really far in my memory -- no idea of what the theorem really says :-)

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list