[Python-ideas] Could the ast module's ASTs preserve source_length in addition to lineno and col_offset?

Haoyi Li haoyi.sg at gmail.com
Fri May 31 11:59:44 CEST 2013


Ok, I'll give it a shot; I'm not familiar with the python codebase or build
process, but i'll puzzle it out. Where's the place to go for help related
to this sort of thing? python-dev?


On Fri, May 31, 2013 at 1:04 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:

>
> On 31 May 2013 14:28, "Haoyi Li" <haoyi.sg at gmail.com> wrote:
> >
> > Anyone else have any thoughts about this? This seems like it would be a
> pretty straightforward thing to do, and I would be happy to go through the
> code and submit a patch. The only question is whether we want to do it in
> the first place; are there any reasons it can't/shouldn't be done that I'm
> not aware of?
>
> Seems reasonable to me, but would need to see a patch to give a definite
> yes or no.
>
> Cheers,
> Nick.
>
> >
> >
> > On Wed, May 29, 2013 at 8:09 PM, Steven D'Aprano <steve at pearwood.info>
> wrote:
> >>
> >> On 30/05/13 10:04, Haoyi Li wrote:
> >>>
> >>> 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.
> >>
> >>
> >> And so you did say. Sorry for the noise.
> >>
> >>
> >> --
> >> Steven
> >> _______________________________________________
> >> Python-ideas mailing list
> >> Python-ideas at python.org
> >> http://mail.python.org/mailman/listinfo/python-ideas
> >
> >
> >
> > _______________________________________________
> > Python-ideas mailing list
> > Python-ideas at python.org
> > http://mail.python.org/mailman/listinfo/python-ideas
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130531/5d365fe9/attachment.html>


More information about the Python-ideas mailing list