Re: Compiler, ast and forwards/backwards compatibility

2008-10-09 Thread Orestis Markou
On Wed, Oct 8, 2008 at 9:14 PM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> The documentation for the ast module states that it "helps to find out >> programmatically what the current grammar looks like". I can't find >> any reference (even when reading the code) on how you should go about >> t

Re: Compiler, ast and forwards/backwards compatibility

2008-10-08 Thread Martin v. Löwis
> My confusion starts with the fact that I'm not sure if all Python 2.4 > code is going to be syntactically valid 2.6 code. That's not so much a matter of confusion, but of careful research. I *think* all code that is syntactically correct in 2.4 is also syntactically correct in 2.6 - but only be

Re: Compiler, ast and forwards/backwards compatibility

2008-10-08 Thread Martin v. Löwis
> The documentation for the ast module states that it "helps to find out > programmatically what the current grammar looks like". I can't find > any reference (even when reading the code) on how you should go about > this, other than checking the sys.version number and reading up on the > changes.

Re: Compiler, ast and forwards/backwards compatibility

2008-10-07 Thread Terry Reedy
Orestis Markou wrote: On Tue, Oct 7, 2008 at 5:39 PM, Terry Reedy <[EMAIL PROTECTED]> wrote: Orestis Markou wrote: Hello, I'm the developer of PySmell ( http://github.com/orestis/pysmell ), a static analysis/intellisense provider for Python. I am targeting Python 2.4 code so I'm using the comp

Re: Compiler, ast and forwards/backwards compatibility

2008-10-07 Thread Orestis Markou
On Tue, Oct 7, 2008 at 5:39 PM, Terry Reedy <[EMAIL PROTECTED]> wrote: > Orestis Markou wrote: >> >> Hello, >> >> I'm the developer of PySmell ( http://github.com/orestis/pysmell ), a >> static analysis/intellisense provider for Python. I am targeting >> Python 2.4 code so I'm using the compiler pa

Re: Compiler, ast and forwards/backwards compatibility

2008-10-07 Thread Terry Reedy
Orestis Markou wrote: Hello, I'm the developer of PySmell ( http://github.com/orestis/pysmell ), a static analysis/intellisense provider for Python. I am targeting Python 2.4 code so I'm using the compiler package. I've been toying around yesterday with the ast module in Python 2.6 and it seems

Compiler, ast and forwards/backwards compatibility

2008-10-07 Thread Orestis Markou
Hello, I'm the developer of PySmell ( http://github.com/orestis/pysmell ), a static analysis/intellisense provider for Python. I am targeting Python 2.4 code so I'm using the compiler package. I've been toying around yesterday with the ast module in Python 2.6 and it seems much more cleaner. One