[Python-Dev] how important is setting co_filename for a module being imported to what file is set to? (original) (raw)
Brett Cannon brett at python.org
Mon Aug 31 18:27:49 CEST 2009
- Previous message: [Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?
- Next message: [Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Aug 31, 2009 at 08:10, Antoine Pitrou<solipsis at pitrou.net> wrote:
Benjamin Peterson <benjamin python.org> writes:
> Why can't we simply make cofilename a writable attribute instead of inventing > some complicated API? Because code objects are supposed to be a immutable hashable object? Right, but cofilename is used neither in tphash nor in tprichcompare.
I didn't suggest this since I assumed co_filename was made read-only for a reason back when the design decision was made. But if the original safety concerns are not there then I am happy to simply change the attribute to writable.
-Brett
- Previous message: [Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?
- Next message: [Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]