Path: csiph.com!usenet.pasdenom.info!news.chainon-marquant.org!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.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.021 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:Python': 0.05; 'rules.': 0.07; 'python': 0.08; 'am,': 0.12; '16,': 0.15; 'case.': 0.15; 'python?': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'omitting': 0.16; 'wrote:': 0.18; '>>>': 0.18; "aren't": 0.21; 'received:209.85.210.174': 0.21; 'received:mail- iy0-f174.google.com': 0.21; 'header:In-Reply-To:1': 0.22; 'import': 0.27; 'message-id:@mail.gmail.com': 0.29; 'explicit': 0.29; 'colon': 0.30; 'cases': 0.32; 'break': 0.32; "isn't": 0.33; 'it.': 0.33; 'fri,': 0.34; 'to:addr:python-list': 0.35; 'regular': 0.35; 'received:google.com': 0.37; 'received:209.85': 0.38; 'enough': 0.38; 'possible,': 0.39; 'received:209': 0.39; 'to:addr:python.org': 0.40; 'worth': 0.61; 'special': 0.66; 'refuse': 0.67; 'saving': 0.78; 'beats': 0.84; 'readability': 0.84; 'zen': 0.84 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:to :content-type; bh=QLa6somgkvSmUOhXQEXkXksOACgMxkIYzV+iQjucmHo=; b=x8VXXL2Vkr8kTAx3Ml92+XRUWkVsGlE2ukYglGiCsk8yBOj+sFeJYZo7CnoHfT3z/3 46MCvL2B9g7m6p0zDg/MtAaqenYV4mYZIQVvFb33PRyv7bgFr5JttaFfDas7OrQAlKM5 eyLNw+IADTSj90ikQXVt+Zs7zxXfF5xkh2RzhRZPxS4EY1bMFuq3Tz1DQTL+eFO1lJez p9t7QvV7AjVK+/HpU93S5vcvXd1jvnkf6ToQodC8SVkX8s9/rbM1QvXADyxHh3YmXnrS TUOjz9Xal7vTRYeUmhyQGVG6uZUfPZBal167mbH+fSm/OcTp1Wddf3OMlu0wUHXtGD6g RM8Q== MIME-Version: 1.0 In-Reply-To: <4f620557$0$1388$4fafbaef@reader2.news.tin.it> References: <4f612b19$0$1379$4fafbaef@reader2.news.tin.it> <8e72d74f-c844-4de3-8a37-f6b1fdc2291f@y27g2000yqy.googlegroups.com> <50e9ceec-40f1-4ead-b2b6-87328b30d084@ow8g2000pbc.googlegroups.com> <4f61c828$0$1390$4fafbaef@reader2.news.tin.it> <4f61d728$0$1375$4fafbaef@reader2.news.tin.it> <4f61fd0a$0$1389$4fafbaef@reader2.news.tin.it> <4f620557$0$1388$4fafbaef@reader2.news.tin.it> Date: Fri, 16 Mar 2012 02:14:54 +1100 Subject: Re: Python is readable From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1331824498 news.xs4all.nl 6847 [2001:888:2000:d::a6]:37630 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21686 On Fri, Mar 16, 2012 at 2:05 AM, Kiuhnm wrote: > I had thought about the single-line case. What I hadn't thought about is > that Python strives to be as regular as possible, so having different cases > just for saving one keystroke isn't worth it. Yep. Have you read the Zen of Python? >>> import this (trimmed for brevity) Explicit is better than implicit. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. In the face of ambiguity, refuse the temptation to guess. Omitting the colon is definitely a not-special-enough case. ChrisA