Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.028 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'source,': 0.04; 'subject:skip:c 10': 0.07; 'cc:addr:python-list': 0.09; 'creighton': 0.09; 'python': 0.10; '2.7': 0.13; 'wed,': 0.15; 'thu,': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'say)': 0.16; 'simple.': 0.16; 'utterly': 0.16; 'wrote:': 0.16; 'laura': 0.18; 'working.': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'aug': 0.20; "aren't": 0.22; 'leave': 0.23; 'dependent': 0.23; 'header:In- Reply-To:1': 0.24; 'install': 0.25; 'subject:list': 0.26; 'linux': 0.26; 'chris': 0.26; 'supported': 0.27; 'packaging': 0.27; 'least': 0.27; 'message-id:@mail.gmail.com': 0.27; 'values': 0.28; 'measure': 0.29; 'that.': 0.30; 'branch': 0.30; 'version,': 0.30; 'certain': 0.31; 'another': 0.32; "can't": 0.32; 'older': 0.32; 'though,': 0.32; 'problem': 0.33; '(for': 0.34; 'running': 0.34; 'received:google.com': 0.35; 'done': 0.35; 'newer': 0.35; 'skip:> 10': 0.35; "isn't": 0.35; 'but': 0.36; 'there': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'there,': 0.37; 'release': 0.37; 'version': 0.38; 'why': 0.39; 'application': 0.39; 'build': 0.40; 'subject:with': 0.40; 'some': 0.40; 'your': 0.60; 'skip:u 10': 0.61; 'back': 0.62; 'bridge': 0.63; 'improved': 0.63; 'more': 0.63; 'grab': 0.64; 'restore': 0.70; 'yourself': 0.73; '+1000,': 0.84; '2.7.': 0.84; 'chrisa': 0.84; 'fortunately': 0.84; 'upgrade,': 0.84; 'to:none': 0.91; 'careful': 0.91; 'desperate': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=RRuO/4LohOAOZMN98AAlptAh2VpcC46vdDl5Yd2SWu8=; b=cIsj3vCthVIC+xpcNDqAehA5GkLi4dhEUR1Xk1GR5klXrzq9JHnzBZpQalg5eFdl++ bu5e1qyNHxQGw4GOWeplEvYvBUZCo5Vp8mL8G9Se+4zSakdPS8FlOuYHzHU7Pfr0ZSAE FEGJxdWzvm2/wlc8fVOQo/8+uNQz3ZwK5PmlRP0D2pqbb1mkeW+YCELxh82MNUar/08E 6LReX2O4oHXXXpClwp9hSpHy/hMFyVt6cF14ouCclrMlarixp/dyPAB56MpIc8svNh8/ 9rthXrHUPzcQY/a7XbMkM5t1IOcVSx6hEdM1Foy25oWcwqM3d50Drz3cyb9Pn6pa0XnD l9JA== MIME-Version: 1.0 X-Received: by 10.107.31.134 with SMTP id f128mr13198196iof.19.1438836256040; Wed, 05 Aug 2015 21:44:16 -0700 (PDT) In-Reply-To: <201508060439.t764dhdh032346@fido.openend.se> References: <201508060439.t764dhdh032346@fido.openend.se> Date: Thu, 6 Aug 2015 14:44:15 +1000 Subject: Re: GOTCHA with list comprehension From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1438836265 news.xs4all.nl 2895 [2001:888:2000:d::a6]:40492 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95065 On Thu, Aug 6, 2015 at 2:39 PM, Laura Creighton wrote: > In a message of Wed, 05 Aug 2015 17:05:49 +1000, Chris Angelico writes: >>Incidentally, why Python 2.6? Python 2.7 has been out for a pretty >>long time now, and if you can't move to version 3.x, I would at least >>recommend using 2.7. Since the release of 2.6.9 back before Frozen >>came out, that branch has been completely unmaintained. Grab yourself >>a 2.7 and take advantage of some neat new features (for old values of >>"new"), and improved compatibility with 3.x. >> >>ChrisA > > Be careful suggesting that people upgrade, at least until you have > found out that they aren't running CentOS enterprise edition. The > CentOS packaging system is utterly dependent on having the Python > version it expects, and if you install a more recent version > (from source, say) the whole packaging system will stop working. > Recovering from this problem is also very, very difficult (unless > you just restore from a recent full backup). > > Been there, done that. :( Yeah. Fortunately there are ways to leave the system Python untouched while adding in another Python for some other purpose... and, if you're desperate enough, you can even leave the Apache-Python bridge using an older build of Python while running key parts of your web application in a newer version, but that requires a certain measure of insanity! There will come a time, though, when every supported Linux distro is shipping either 2.7 or 3.x. And it isn't far off. When that happens, advising the upgrade will be simple. ChrisA