<html><head></head><body>Well, not quite the same thing, but <a href="https://github.com/kirbyfan64/pfbuild/blob/master/pfbuild">https://github.com/kirbyfan64/pfbuild/blob/master/pfbuild</a> embeds the compressed version of 16k LOC. Would it be affected negatively in any way be this?<br>
<br>
Since all the data is on one line, I'd think the old (current) parser would end up reading in the whole line anyway.<br><br><div class="gmail_quote">On November 18, 2015 9:48:41 AM CST, Guido van Rossum <guido@python.org> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On Wed, Nov 18, 2015 at 4:15 AM, Hrvoje Niksic <hrvoje.niksic@avl.com> wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> On 11/18/2015 03:31 AM, Nick Coghlan wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><br /> That behaviour is then inherited at the command line by both the -m<br /> switch and the support for executing directories and zip archives.<br /> When we consider that the "-c" switch also executes an in-memory<br /> string, direct script execution is currently the odd one out in *not*<br /> reading the entire source file into memory first, so Serhiy's proposed<br /> simplification of the implementation makes sense to me.<br /></blockquote><br /><br /> Reading the whole script in memory will incur an overhead when executing<br /> scripts that contain (potentially large) data embedded
after the end of<br /> script source.<br /><br /> The technique of reading data from sys.argv[0] is probably obsolete now that<br /> Python supports executing zipped archives, but it is popular in shell<br /> scripting and might still be used for self-extracting scripts that must<br /> support older Python versions. This feature doesn't affect imports and -c<br /> which are not expected to contain non-Python data.<br /></blockquote><br />That trick doesn't work unless the data looks like Python comments or<br />data (e.g. a docstring). Python has always insisted on being able to<br />parse until EOF. The only extreme case would be a small script<br />followed by e.g. 4 GB of comments (where the old parser would indeed<br />be more efficient). But unless you can point me to an occurrence of<br />this in the wild I'm going to speculate that you just made this up<br />based on the shell analogy (which isn't perfect).<br /></pre></blockquote></div><br>
-- <br>
Sent from my Nexus 5 with K-9 Mail. Please excuse my brevity.</body></html>