Re: pylint or similar to test version-specific language constructs?

2013-01-13 Thread jkn
Hi Dave On 11 Jan, 15:06, Dave Angel d...@davea.name wrote: Not sure what you mean by beforehand.  Don't you run all your unit tests before putting each revision of your code into production?  So run those tests twice, once on 2.7, and once on 2.4.  A unit test that's testing code with a

Re: pylint or similar to test version-specific language constructs?

2013-01-13 Thread Chris Angelico
On Mon, Jan 14, 2013 at 4:56 AM, jkn jkn...@nicorp.f9.co.uk wrote: Hi Dave On 11 Jan, 15:06, Dave Angel d...@davea.name wrote: Not sure what you mean by beforehand. Don't you run all your unit tests before putting each revision of your code into production? So run those tests twice, once

Re: pylint or similar to test version-specific language constructs?

2013-01-11 Thread The Night Tripper
Gisle Vanem wrote: jkn jkn...@nicorp.f9.co.uk wrote: I have to write python code which must run on an old version of python (v2.4) as well as a newer (v2.7). I am using pylint and would like to check if is possible to check with pylint the use of operators etc. which are not present in

Re: pylint or similar to test version-specific language constructs?

2013-01-11 Thread thenault
On Thursday, January 10, 2013 12:45:32 AM UTC+1, jkn wrote: Hi all I have to write python code which must run on an old version of python (v2.4) as well as a newer (v2.7). I am using pylint and would like to check if is possible to check with pylint the use of operators etc. which

Re: pylint or similar to test version-specific language constructs?

2013-01-11 Thread Terry Reedy
On 1/11/2013 3:29 AM, The Night Tripper wrote: Gisle Vanem wrote: jkn jkn...@nicorp.f9.co.uk wrote: I have to write python code which must run on an old version of python (v2.4) as well as a newer (v2.7). I am using pylint and would like to check if is possible to check with pylint the

Re: pylint or similar to test version-specific language constructs?

2013-01-11 Thread Dave Angel
On 01/11/2013 03:29 AM, The Night Tripper wrote: Gisle Vanem wrote: jkn jkn...@nicorp.f9.co.uk wrote: I have to write python code which must run on an old version of python (v2.4) as well as a newer (v2.7). I am using pylint and would like to check if is possible to check with pylint the

Re: pylint or similar to test version-specific language constructs?

2013-01-11 Thread Steven D'Aprano
On Fri, 11 Jan 2013 10:06:30 -0500, Dave Angel wrote: On 01/11/2013 03:29 AM, The Night Tripper wrote: Gisle Vanem wrote: jkn jkn...@nicorp.f9.co.uk wrote: I have to write python code which must run on an old version of python (v2.4) as well as a newer (v2.7). I am using pylint and

Re: pylint or similar to test version-specific language constructs?

2013-01-11 Thread Dave Angel
On 01/11/2013 10:37 AM, Steven D'Aprano wrote: On Fri, 11 Jan 2013 10:06:30 -0500, Dave Angel wrote: snip Not sure what you mean by beforehand. Don't you run all your unit tests before putting each revision of your code into production? So run those tests twice, once on 2.7, and once on

pylint or similar to test version-specific language constructs?

2013-01-09 Thread jkn
Hi all I have to write python code which must run on an old version of python (v2.4) as well as a newer (v2.7). I am using pylint and would like to check if is possible to check with pylint the use of operators etc. which are not present in 2.4; the ternary operator springs to mind. I haven't

Re: pylint or similar to test version-specific language constructs?

2013-01-09 Thread Gisle Vanem
jkn jkn...@nicorp.f9.co.uk wrote: I have to write python code which must run on an old version of python (v2.4) as well as a newer (v2.7). I am using pylint and would like to check if is possible to check with pylint the use of operators etc. which are not present in 2.4; the ternary