On Mon, Aug 31, 2009 at 12:27, Antoine Pitrou<solip...@pitrou.net> wrote: > Brett Cannon <brett <at> python.org> writes: >> >> I will plan to take this approach then; >> http://bugs.python.org/issue6811 will track all of this. Since this is >> a 3.2 thing I am not going to rush to implement this. > > I still don't understand what the point is of this complicated approach > (adding > an argument to marshal.load()) compared to the simple and obvious approach > (making co_filename mutable).
If we add the argument to marshal.load* we can eventually drop the file location string from marshal data entirely by requiring people to specify the filename to use when the code object is created. Making co_filename mutable simply doesn't allow for this case unless we decide a default value should be used instead. > Besides, the latter would let you code the recursive renaming algorithm in > Python, which is the whole point of importlib (rewriting most code in Python), > isn't it? Sure, but I am not about to re-implement marshal in pure Python just because importlib uses it. -Brett _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com