[Python-Dev] how important is setting co_filename for a module being imported to what file is set to? (original) (raw)
Benjamin Peterson benjamin at python.org
Mon Aug 31 16:55:56 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 ]
2009/8/31 Antoine Pitrou <solipsis at pitrou.net>:
Brett Cannon <brett python.org> writes:
Now I can't change cofilename from Python as it's a read-only attribute and thus can't match this functionality in importlib w/o creating some custom code to allow me to specify the cofilename somewhere 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?
-- Regards, Benjamin
- 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 ]