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


Groups > comp.lang.python > #36621

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

From Terry Reedy <tjreedy@udel.edu>
Subject Re: pylint or similar to test version-specific language constructs?
Date 2013-01-11 08:38 -0500
References <1454e34f-5ca0-4f49-ad29-c99df4fdd322@gu9g2000vbb.googlegroups.com> <mailman.349.1357776502.2939.python-list@python.org> <QeednQoFKKHXUHLNnZ2dnUVZ8gadnZ2d@brightview.co.uk>
Newsgroups comp.lang.python
Message-ID <mailman.397.1357911591.2939.python-list@python.org> (permalink)

Show all headers | View raw


On 1/11/2013 3:29 AM, The Night Tripper wrote:
> Gisle Vanem wrote:
>
>> "jkn" <jkn_gg@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 operator springs to
>>> mind.
>>
>> No idea about PyLint. Why not install Python 2.4 and test
>> with that? Sounds safer IMHO.
>
> I do have Python 2.4 installed; but I would like a checker that warned me
> beforehand about trying to use constructs (like the ternary operator,
> decorators) which are version-specific.

Search each chapter of the reference manual (about 7) for 'version changed'.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

pylint or similar to test version-specific language constructs? jkn <jkn_gg@nicorp.f9.co.uk> - 2013-01-09 15:45 -0800
  Re: pylint or similar to test version-specific language constructs? Gisle Vanem <gvanem@broadpark.no> - 2013-01-10 01:07 +0100
    Re: pylint or similar to test version-specific language constructs? The Night Tripper <jkn+gg@nicorp.co.uk> - 2013-01-11 08:29 +0000
      Re: pylint or similar to test version-specific language constructs? Terry Reedy <tjreedy@udel.edu> - 2013-01-11 08:38 -0500
      Re: pylint or similar to test version-specific language constructs? Dave Angel <d@davea.name> - 2013-01-11 10:06 -0500
        Re: pylint or similar to test version-specific language constructs? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-11 15:37 +0000
          Re: pylint or similar to test version-specific language constructs? Dave Angel <d@davea.name> - 2013-01-11 11:09 -0500
        Re: pylint or similar to test version-specific language constructs? jkn <jkn_gg@nicorp.f9.co.uk> - 2013-01-13 09:56 -0800
          Re: pylint or similar to test version-specific language constructs? Chris Angelico <rosuav@gmail.com> - 2013-01-14 07:59 +1100
  Re: pylint or similar to test version-specific language constructs? thenault@gmail.com - 2013-01-11 00:35 -0800

csiph-web