On Tue, 16 Nov 2004, Jeremy Hylton wrote: > Functions already have a reference to code objects. How is this different? This is the python-code text. >>> def foo (): ... # comment -- instead of doc ... print 'santa' ... >>> print foo.__pycode__ def foo(): # comment -- instead of doc print 'santa' This is fun as I explained in the post at c.l.p because with a function: def save(FILE): for a in globals(): if type(eval(a)) == FunctionType: FILE.write (eval(a).__pycode__) We can save the entire state in a file and continue from there next time. Stelios
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4