On 11/29/2011 03:55 AM, Dave Angel wrote:
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.
Ok thanks,
something like this is ok?
(or maybe I can use a try/catch and export my own if is not found in the
standard library?)
from sys import version_info
if version_info[1] == 5:
from psi.devsonly.ast import parse, NodeVisitor
else:
from ast import parse, NodeVisitor
--
http://mail.python.org/mailman/listinfo/python-list