[Python-ideas] Move optional data out of pyc files

Ethan Furman ethan at stoneleaf.us
Tue Apr 10 14:13:01 EDT 2018


On 04/10/2018 10:54 AM, Zachary Ware wrote:
> On Tue, Apr 10, 2018 at 12:38 PM, Chris Angelico <rosuav at gmail.com> wrote:
>> A deployed Python distribution generally has .pyc files for all of the
>> standard library. I don't think people want to lose the ability to
>> call help(), and unless I'm misunderstanding, that requires
>> docstrings. So this will mean twice as many files and twice as many
>> file-open calls to import from the standard library. What will be the
>> impact on startup time?
>
> What about instead of separate files turning the single file into a
> pseudo-zip file containing all of the proposed files, and provide a
> simple tool for removing whatever parts you don't want?

-O and -OO already do some trimming; perhaps going that route instead of having multiple files would be better.

--
~Ethan~



More information about the Python-ideas mailing list