[Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?

Antoine Pitrou solipsis at pitrou.net
Mon Aug 31 22:47:34 CEST 2009


Brett Cannon <brett <at> python.org> writes:
> 
> I should also mention that I am +0 on the marshal.load* change. I
> could be convinced to try to pursue a mutable co_filenme direction,
> but considering the BDFL likes the marshal.load* approach and it opens
> up the possibility of compacting the marshal format I am leaning
> towards sticking with this initial direction.

I am really not opinionated on this one. I was just pointing out that choosing a
non-obvious solution generally requires good reasons to do so. The marshal
format compaction sounds like premature optimization, since nobody seems to have
formulated such a request.

Regards

Antoine.




More information about the Python-Dev mailing list