<div dir="ltr">I don't need to keep the source code, I just need a single integer for each node. I would then be able to reconstruct the source snippet.<div><br></div><div><br></div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Wed, May 29, 2013 at 7:47 PM, Steven D'Aprano <span dir="ltr"><<a href="mailto:steve@pearwood.info" target="_blank">steve@pearwood.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 30/05/13 09:06, Haoyi Li wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I want the original source code for debugging/tracing purposes<br>
</blockquote>
<br></div>
Do you have an idea of the memory overhead of keeping the source code around?<br>
<br>
Is it worth having the ast module honour the __debug__ flag (-O and -OO switches), and *not* preserve source when optimizations are in effect? That may mean that some ast operations cannot run under -O or -OO, in the same way that code that cares about __doc__ strings cannot meaningfully run under -OO. That's okay by me.<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
-- <br>
Steven<br>
______________________________<u></u>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-ideas" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/python-ideas</a><br>
</font></span></blockquote></div><br></div>