Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #32566
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!rt.uk.eu.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <z@etiol.net> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.057 |
| X-Spam-Evidence | '*H*': 0.89; '*S*': 0.00; 'received:209.85.223': 0.03; 'parentheses:': 0.16; 'pythonic': 0.16; 'readable': 0.16; 'wrote:': 0.17; 'to:name:python-list@python.org': 0.20; 'stick': 0.22; 'header:In-Reply-To:1': 0.25; '???': 0.27; 'message- id:@mail.gmail.com': 0.27; 'colon': 0.29; 'to:addr:python-list': 0.33; 'everyone': 0.33; 'received:google.com': 0.34; 'said,': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'really': 0.36; 'but': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'most': 0.61; 'more': 0.63; 'instantly': 0.93 |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:content-type :x-gm-message-state; bh=tFF0oxPxqlNPnwgHhaPlwqaBWVuC+qEqUprMnUqSm3o=; b=JpnAX3HU7LgUzojZ7o3rnE0mV2o2NXgi4xVDzsEZYVFEfPnNestPCjs2FerzYLDhgf tHZUEDgPjHPA/+W0grCq/+Ebe7BOltveHTB5aMxcuZ3a1Y3X/bCaYiG+UrRR7mabwhxc 266Dj04iVQ1uKUc1kyfbQNYTRud0qpaNGz3xG/3QJ1Rfp6T2x+bNW4FAOQHqI9p9XwT1 fdhSUU9BmUWVU0iKZTTPEWmuswtt+dc2uxj19USWwBZwG1Ja//to9xIXeayyvGiDKaln dsdNkQIDkOLnv48Bdreo9j9cHVVkmjlJoX4AGhaZuXzPky/FXjvLTQ5AA4++1SNIG8Cq AqhQ== |
| MIME-Version | 1.0 |
| Sender | z@etiol.net |
| X-Originating-IP | [190.104.31.26] |
| In-Reply-To | <CAFqGZREfq7fO4Okf1Oj9HBeUkWLYK_9=ho8N47_kyTKudGZSFA@mail.gmail.com> |
| References | <CAFqGZREfq7fO4Okf1Oj9HBeUkWLYK_9=ho8N47_kyTKudGZSFA@mail.gmail.com> |
| From | Zero Piraeus <schesis@gmail.com> |
| Date | Thu, 1 Nov 2012 12:54:43 -0400 |
| X-Google-Sender-Auth | hJ07gM2MaeiWiqj7dBfCa1eRZOM |
| Subject | Re: pythonic way |
| To | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| X-Gm-Message-State | ALoCoQkWF34pZXYihkHS2NV7pidD1QnazMiMpgEggUPktWtoro4We1YGJxv/+SXVN27G2k8OyX1o |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3159.1351788913.27098.python-list@python.org> (permalink) |
| Lines | 17 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1351788913 news.xs4all.nl 6973 [2001:888:2000:d::a6]:36568 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:32566 |
Show key headers only | View raw
:
On 1 November 2012 11:32, inshu chauhan <insideshoes@gmail.com> wrote:
> what is the most pythonic way to do this :
>
> if 0 < ix < 10 and 0 < iy < 10 ???
As everyone else has said, it's perfectly pythonic once you stick the
colon on the end. You might find it more instantly readable with some
extra parentheses:
if (0 < ix < 10) and (0 < iy < 10):
# do something
... but that's really just down to taste.
-[]z.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: pythonic way Zero Piraeus <schesis@gmail.com> - 2012-11-01 12:54 -0400
csiph-web