A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-August/091510.html below:

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

[Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to? [Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?Fred Drake fdrake at acm.org
Mon Aug 31 23:04:25 CEST 2009
On Aug 31, 2009, at 4:47 PM, Antoine Pitrou wrote:
> 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.


Every time I've been bitten by the wrong co_filename values (usually  
from tracebacks), changing the way marshal creates code objects to use  
a values passed in has been the thing that made the most sense to me.

The feature request that's involved here, getting correct co_filename  
values, can be implemented in different ways, sure.  This particular  
change produces the least impact in the because it *doesn't* change  
the mutability of code objects.

I for one appreciate that, mostly because I'm simply wary of making  
code objects mutable in this way having unexpected side effects in  
some library.


   -Fred

-- 
Fred Drake   <fdrake at acm.org>

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4