Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.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.079 X-Spam-Evidence: '*H*': 0.84; '*S*': 0.00; 'test,': 0.05; 'operand': 0.07; 'seemed': 0.07; 'subject:code': 0.07; 'python': 0.09; '"x"': 0.16; '(well,': 0.16; 'wrote:': 0.17; 'sender:addr:gmail.com': 0.18; 'math': 0.20; "i'd": 0.22; "i've": 0.23; 'header:In-Reply- To:1': 0.25; 'received:209.85.210.46': 0.27; 'received:mail- pz0-f46.google.com': 0.27; 'once.': 0.29; 'smart': 0.29; 'surprised': 0.29; "i'm": 0.29; 'classes': 0.30; 'code': 0.31; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'needed': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'wanted': 0.36; 'too': 0.36; 'charset:us-ascii': 0.36; 'enough': 0.36; 'two': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'think': 0.40; 'john': 0.60; 'range': 0.60; 'first': 0.61; 'header:Message- Id:1': 0.62; 'p.s.': 0.63; 'ever': 0.63; 'jul': 0.65; 'guessed': 0.84; 'newcomer': 0.84; 'norm': 0.84; "they'd": 0.84; 'dennis': 0.91; 'forgotten': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:in-reply-to:references :x-mailer:mime-version:content-type:content-transfer-encoding; bh=Y8B0YvtmuC9ALEucCsk3CGyh1+kh2jacy3/XrFKLQrc=; b=AATkRsQ6VPrYT88VMaltlt1B/aCliAjTRWIxPwQVShDtKyjD86EAz2fMbfjo8AmQHt A0rG1C/yQXWxM5vyqvzfuyXP+YovVmS2OmXSXw8aLwGqv4mecy4M4Wr9xvcTabih5063 +o4jqEZd3eI+4ByZKEzduOg8/5nVDX4fzEMYmtu5mcphfpZ0jPxjHm680WnwT6P4p7U4 +LkJB05LZnAma8k4cG7hEpDkK+Tqp7kuJQOYxFfeudrXbbRySN8XzVlXJXJwnnaDVicy uYUk7wCPj280WPpgGJbWH4CSuaRIihw7p3cIAfDBWx4jnG2162e6q1j2iVKhHxIKzN2z Nizw== Sender: "John O'Hagan" Date: Mon, 2 Jul 2012 14:43:00 +1000 From: John O'Hagan To: python-list@python.org Subject: Re: code review In-Reply-To: References: <2662370.TGmo96CKe1@PointedEars.de> <87wr2oecf6.fsf@dpt-info.u-strasbg.fr> <4FEF7117.7000109@jollybox.de> <87bok0qr62.fsf@benfinney.id.au> <87395cq6sr.fsf@benfinney.id.au> X-Mailer: Sylpheed 3.2.0beta9 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1341204197 news.xs4all.nl 6940 [2001:888:2000:d::a6]:41133 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:24763 On Sun, 01 Jul 2012 13:41:20 -0400 Dennis Lee Bieber wrote: > I'd think a true newcomer (to programming) would have NO > expectations... And if they'd had any complex math classes may actually > consider > if 1 < x < 10: > to be the norm [...] +1 I've only ever known Python (well, I've almost forgotten Bash), and when I first needed a range test, I guessed at the above form and was pleasantly surprised that it worked: it seemed too good to be true that Python was smart enough to know I wanted the same "x" to be an operand in two comparisons at once. John P.S. I know I'm not helping, but I'm starting to feel sorry for the guy who wanted his code reviewed! John