Reason why co_filename is no longer interned?

2009-03-01 Thread David Christian
In 2005, when the ast branch was merged to head, compile.c when setting the filename for the code object, PyString_InternFromString was replaced with PyString_FromString. http://svn.python.org/view?view=revrevision=39758 This means that where before, you could rely that

Re: Reason why co_filename is no longer interned?

2009-03-01 Thread Benjamin Peterson
David Christian david.christian at gmail.com writes: This means that where before, you could rely that function.func_code.co_filename == function1.func_code.co_filename Regardless of the change's intentionality, you should never rely on that behavior! Interned strings are an implementation

Re: Reason why co_filename is no longer interned?

2009-03-01 Thread Chris Rebert
On Sun, Mar 1, 2009 at 5:03 PM, David Christian david.christ...@gmail.com wrote: In 2005, when the ast branch was merged to head, compile.c when setting the filename for the code object, PyString_InternFromString was replaced with PyString_FromString.

Re: Reason why co_filename is no longer interned?

2009-03-01 Thread Benjamin Peterson
2009/3/1 David Christian david.christ...@gmail.com: On Sun, Mar 1, 2009 at 8:15 PM, Benjamin Peterson benja...@python.org wrote: David Christian david.christian at gmail.com writes: This means that where before, you could rely that function.func_code.co_filename ==