Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #32562 > unrolled thread
| Started by | Tim Chase <python.list@tim.thechases.com> |
|---|---|
| First post | 2012-11-01 10:57 -0500 |
| Last post | 2012-11-01 10:57 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: pythonic way Tim Chase <python.list@tim.thechases.com> - 2012-11-01 10:57 -0500
| From | Tim Chase <python.list@tim.thechases.com> |
|---|---|
| Date | 2012-11-01 10:57 -0500 |
| Subject | Re: pythonic way |
| Message-ID | <mailman.3154.1351785382.27098.python-list@python.org> |
On 11/01/12 10:32, inshu chauhan wrote:
> what is the most pythonic way to do this :
>
> if 0 < ix < 10 and 0 < iy < 10 ???
What's wrong with the syntax you provide? It's perfectly pythonic:
ix = 42
yx = 3.14159
if 0 < ix < 10 and 0 < iy < 10:
do_stuff(ix, iy)
else:
do_other_stuff(ix, iy)
-tkc
Back to top | Article view | comp.lang.python
csiph-web