RE: Mutable Bytes

"Mark Hahn" <[email protected]> Mon, 26 Jul 2004 21:06:19 -0700
Newsgroups gmane.comp.lang.prothon.user
Message-ID <000201c4738f$124f7010$0d01a8c0@MarkVaio>
Greg Ewing wrote:
 
> > Every function is copied before it is called
> 
> Pardon? Why is that necessary?

Even before I decided to store the local vars in the function attributes, I
ran into trouble having only one function object for all running copies
early on.  I can't find the messages in the archives but I had to do the
copy to get normal Python-like behavior.  I remember someone complaining and
my adding the copy.  Now you've got me curious.  I'll keep looking.

The function object is only a few words so it is no big deal.  If we didn't
have to create a new copy of it we'd have to create a new local scope object
anyway.