set built-in func_code?
Birgit Rahm
br_y at yahoo.de
Tue Sep 9 08:11:33 EDT 2003
Hallo,
I have a program (not written by me :-( ) that loads socalled helpfunctions
and executes that dynamically.
One error message was : ... cant get the func_code of the helpfunctionX.
Which reason this message has, I dont now.
My main problem is, that I dont know what func_code is : a built-in function
or attribute or what ? And why is it used.
>> I want to set the built-in func_code in my function, how can I does
>> this in the correct way?
>
> I don't think that's possible for an existing function object. [...]
Well, maybe I should try before I post:
#v+
>>> def f(): print 5
...
>>> def g(): print 6
...
>>> f.func_code = g.func_code
>>> f()
6
#v-
By the way, what's about __import__?
I hope it is not so confusing as I feel ...
Birgit
More information about the Python-list
mailing list