[Python-ideas] Move optional data out of pyc files
Serhiy Storchaka
storchaka at gmail.com
Thu Apr 12 06:21:32 EDT 2018
10.04.18 19:24, Antoine Pitrou пише:
>> 2. Line numbers (lnotab). They are helpful for formatting tracebacks,
>> for tracing, and debugging with the debugger. Sources are helpful in
>> such cases too. If the program doesn't contain errors ;-) and is sipped
>> without sources, they could be removed.
>
> What is the weight of lnotab arrays? While docstrings can be large,
> I'm somehow skeptical that removing lnotab arrays would bring a
> significant improvement. It would be nice to have more data about this.
Maybe it is low. I just mentioned three kinds of data in pyc files that
can be optional. If move out docstrings and annotations, why not move
lnotabs? It would be easy if we already implement the infrastructure for
others two.
>> 3. Annotations. They are used mainly by third party tools that
>> statically analyze sources. They are rarely used at runtime.
>
> Even less used than docstrings probably.
And since there is a way of providing annotations in human-readable
format separately from source codes, it looks naturally to provide a way
for compiling them into separate files.
More information about the Python-ideas
mailing list