Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2a.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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'explicitly': 0.05; 'explicit': 0.07; 'incompatible': 0.07; 'interpreter.': 0.07; 'agree,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; '"python"': 0.16; 'finney': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'survive': 0.16; 'targeting': 0.16; 'files.': 0.16; 'work,': 0.20; 'command': 0.22; 'install': 0.23; 'header:User-Agent:1': 0.23; 'header:X -Complaints-To:1': 0.27; 'chris': 0.29; 'code': 0.31; 'accidentally': 0.31; 'writes:': 0.31; '(e.g.': 0.33; 'version': 0.36; 'possible': 0.36; 'wrong': 0.37; 'easily': 0.37; 'growing': 0.38; 'ben': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'real': 0.63; 'skip:\xe2 10': 0.65; 'direct': 0.67; 'past,': 0.68; 'subjectcharset:utf-8': 0.72; '8bit%:46': 0.78; 'commands.': 0.84; 'conflicts': 0.84; 'increasingly': 0.84; 'received:125': 0.84; 'virtue': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Use =?utf-8?B?4oCYcHl0aG9uMuKAmQ==?= or =?utf-8?B?4oCYcHl0aG9u?= =?utf-8?B?M+KAmSw=?= explicit is better than implicit (was: l = range(int(1E9))) Date: Fri, 01 May 2015 09:19:57 +1000 References: <87k2wtvbx1.fsf@Equus.decebal.nl> <87mw1ptpr0.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:VlQqH8O49ukkCBTWOz3qZd8YGT4= 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: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1430436032 news.xs4all.nl 2903 [2001:888:2000:d::a6]:60478 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:89683 Chris Angelico writes: > Very easily and simply: Python 3 and Python 2 will always install > separately, and the only possible conflicts are over the "python" > command in PATH and which program is associated with ".py" files. Using the ‘python’ command is now ambiguous, and with Python 2 slipping inexorably into the past, increasingly the ‘python’ command is the wrong choice for Python programs that we want to survive in the future. I am seeing a growing call, with which I agree, to recommend explicitly calling ‘python2’ or ‘python3’ as commands. That includes when we type it for direct one-time invocation, or when we set it as the command for automatic execution of a program (e.g. in the “shebang” line of a program). Use the command ‘python2’ or ‘python3’ to be explicit about which Python version you intend to run. Legacy programs will continue to work, and code targeting Python 3 will not accidentally get an incompatible Python 2 interpreter. -- \ “I don't want to live peacefully with difficult realities, and | `\ I see no virtue in savoring excuses for avoiding a search for | _o__) real answers.” —Paul Z. Myers, 2009-09-12 | Ben Finney