Reason why co_filename is no longer interned?

Benjamin Peterson benjamin at python.org
Mon Mar 2 02:15:14 CET 2009


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 detail even at the C level.







More information about the Python-list mailing list