Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #16374 > unrolled thread

Re: python 2.5 and ast

Started byDave Angel <d@davea.name>
First post2011-11-28 22:55 -0500
Last post2011-11-28 22:55 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: python 2.5 and ast Dave Angel <d@davea.name> - 2011-11-28 22:55 -0500

#16374 — Re: python 2.5 and ast

FromDave Angel <d@davea.name>
Date2011-11-28 22:55 -0500
SubjectRe: python 2.5 and ast
Message-ID<mailman.3116.1322538979.27778.python-list@python.org>
On 11/28/2011 03:08 PM, Terry Reedy wrote:
> On 11/28/2011 6:45 AM, Andrea Crotti wrote:
>> I'm happily using the ast module to analyze some code,
>> but my scripts need also to run unfortunately on python 2.5
>>
>> The _ast was there already, but the ast helpers not yet.
>> Is it ok if I just copy over the source from the ast helpers in my code
>> base
>
> That is the standard way of backporting features of later versions.
>
But don't forget to tag it as version specific, so it gets removed when 
the later version of the library is available.  There are various ways 
of doing that, but the easiest is probably to put a test in the 
acceptance suite that fails if this code is used in 2.6 or later.

-- 

DaveA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web