On Sat, Dec 07, 2019 at 07:37:58PM +0000, Oscar Benjamin wrote:

> I recently hit on a situation that created a one million line code file:
> https://github.com/pytest-dev/pytest/issues/4406#issuecomment-439629715
> 
> The original file (which is included in SymPy) has 3000 lines
> averaging 500 characters per line so that the total file is 1.5MB.
> Since it is a test file pytest rewrites the corresponding pyc file and
> adds extra lines to annotate the intermediate results in the large
> expressions. The pytest-rewritten code has just over a million lines.

If I'm reading you correctly, you're saying that, on average, pytest 
annotates each line of source code with over 300 additional lines of 
code.


> When I first tried pytest with this file it lead to a CPython
> segfault. It seems that the crash in CPython was fixed in 3.7.1 though
> so subsequent versions can work fine with this (although it is slow).

Thanks, this is a good practical anecdote of real-life experience.



-- 
Steven
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/U7GI537CZH7H5CUKTKBYZIFAQLRRWC4B/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to