If not why are code objects supported as a valid type that can be
packed up using the marshal module in python?
if I have:
>>> import marshal
>>> def gru(*args):
... print args
>>> marshalledFunc = marshal.dumps(gru.func_code)
>>> reclaimedFunc = marshal.loads(marshalledFunc)
I can ask if "gru.func_code == reclaimedFunc" and python says you bet,
but I can't then assign reclaimedFunc to any object to get a new
function with the same functionality as gru. (because gru.func_code is
read only).
thanks,
stoakley
-------------------------------------------------------------------------------
Richard Stoakley
rws2v@virginia.edu "It's never to late to have a pleasant childhood!"
University of Virginia