20 Mar
2008
20 Mar
'08
5:27 a.m.
On 19-Mar-08, at 6:44 PM, Collin Winter wrote:
You can pass -p to refactor.py to fix this on a per-run basis. See r58002 (and the revisions it mentions) for a failed attempt to do this automatically.
So, correct me if I'm wrong, but the relevant code is this: - try: - tree = self.driver.parse_string(data) - except parse.ParseError, e: - if e.type == token.EQUAL: - tree = self.printless_driver.parse_string(data) - else: - raise Why not, instead of trying both parsers, scan for a __future__ import, then do the Right Thing based on that?