[Python-Dev] Is core dump always a bug? Advice requested

Robert Brewer fumanchu at amor.org
Thu May 13 15:46:32 EDT 2004


Michel Pelletier wrote:

> I am also working on a short list of static and structural 
> constraints for 
> bytecode, this is what I have so far (the ones i'm unsure about are 
> questions):

A couple gotchas when useing new.code():

1. co_names, co_varnames, co_freevars, and co_cellvars take tuples of
strings; passing unicode strings crashes the interpreter. co_consts,
however, is unicode-safe.

2. Some co_flags should be checked to be consistent with other args; for
example, shouldn't CO_NOFREE be set if co_freevars is empty?


Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org



More information about the Python-Dev mailing list