Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'operator': 0.03; 'that?': 0.05; 'subject:test': 0.07; 'python': 0.09; 'imho.': 0.09; 'operator,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:language': 0.09; 'subject:version': 0.09; 'terry': 0.09; '(like': 0.15; 'constructs': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'ternary': 0.16; 'wrote:': 0.17; 'jan': 0.18; '>>>': 0.18; 'trying': 0.21; 'chapter': 0.23; 'idea': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'mind.': 0.27; 'newer': 0.27; 'header:X-Complaints-To:1': 0.28; 'run': 0.28; 'manual': 0.29; 'install': 0.29; 'code': 0.31; 'to:addr:python-list': 0.33; 'version': 0.34; 'subject:?': 0.35; 'received:org': 0.36; 'but': 0.36; 'test': 0.36; 'possible': 0.37; 'why': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40; 'night': 0.62; 'sounds': 0.71; 'beforehand': 0.84; 'checker': 0.84; 'received:fios.verizon.net': 0.84; 'springs': 0.84; 'safer': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: pylint or similar to test version-specific language constructs? Date: Fri, 11 Jan 2013 08:38:17 -0500 References: <1454e34f-5ca0-4f49-ad29-c99df4fdd322@gu9g2000vbb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357911591 news.xs4all.nl 6874 [2001:888:2000:d::a6]:38127 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36621 On 1/11/2013 3:29 AM, The Night Tripper wrote: > Gisle Vanem wrote: > >> "jkn" 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