On 08/21/2011 07:49 PM, Zooko O'Whielacronx wrote:
[following-up to my own post]
On Sun, Aug 21, 2011 at 11:44 AM, Zooko O'Whielacronx<zo...@zooko.com> wrote:
The behavior of a program is a deterministic function of its source
code, right? So if the source code (*all* of it -- everything that
gets imported and executed at any point during the run of the program)
is identical, then the behavior will be identical, and then re-using
compiled code from previous runs would always yield a correct result.
Am I still on track so far?
Uh-oh, I think I may have already gone off track here in the first
paragraph. What if you use information from the runtime *inputs* --
not imported code but inputted data -- to change how you compile the
code? Then even if *all* of the source code is exactly the same,
re-using the compiled code from the previous run may generate
incorrect results. Is that right?
class A(object):
if time.time() % 2 == 0:
def f(self):
return 1
else:
def f(self):
return 2
:-)
Solving the problem of persisting source code is *seriously* hard, and I
agree with Armin, I'm not going to invest any time in it.
Carl Friedrich
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev