pylint or similar to test version-specific language constructs?
Terry Reedy
tjreedy at udel.edu
Fri Jan 11 08:38:17 EST 2013
On 1/11/2013 3:29 AM, The Night Tripper wrote:
> Gisle Vanem wrote:
>
>> "jkn" <jkn_gg at 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
More information about the Python-list
mailing list