Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100434
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Try: rather than if : |
| Date | Mon, 14 Dec 2015 16:12:26 -0700 |
| Lines | 6 |
| Message-ID | <mailman.0.1450134794.22044.python-list@python.org> (permalink) |
| References | <CALyJZZViT33d8iob-5PoYnJOdPU2RzSzt3YAic_GRaAxN+wE1A@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de j75qUwdqeSAtiQvBpkcL3Q47Bq1JVHS1ZJNdFQaGBWgQ== |
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.028 |
| X-Spam-Evidence | '*H*': 0.94; '*S*': 0.00; 'used.': 0.05; 'another?': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'attribute': 0.18; '2015': 0.20; 'seems': 0.23; 'dec': 0.23; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'message- id:@mail.gmail.com': 0.27; '14,': 0.27; 'code': 0.30; 'statement': 0.32; 'handle': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'there': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'to:addr:python.org': 0.40; 'to:name:python': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Wkq63ZNs34P/LaKs8QCji6uXnsK0UsBaVxQUn4GmOsM=; b=CT6kzBVlpk3dK+Q+ZoURwGQW5wRHk1al7n+X/u3Au+c3tsbKWbyO6qz4W7CvgOiDFD /U4dxbtSGLQivd8kkAvEDNTQ1d+NXKg8xXr45HGj9SAKIgbBynxl3N5C6It6EYFD0iXu RSg465QK0SxZSRxQWINLg3yNrjYmSuyJKbGsIaN3Hb4c2kQpXs+QRxS8UAF+HGg8mR8e NXs9Dl4addFAiKqicHT23BaiYUMDDLfrW20o+WAfaI+OcVgtpmKN/DMnbvkOmj2ydXAA zr89I14sQtXC0kt/qEwm3OedOKGbfsSAiCslkVUI4skW0CU49aayKHZ19q6s+NOeUjfl Vw/w== |
| X-Received | by 10.50.154.5 with SMTP id vk5mr799382igb.85.1450134785989; Mon, 14 Dec 2015 15:13:05 -0800 (PST) |
| In-Reply-To | <CALyJZZViT33d8iob-5PoYnJOdPU2RzSzt3YAic_GRaAxN+wE1A@mail.gmail.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:100434 |
Show key headers only | View raw
On Mon, Dec 14, 2015 at 3:38 PM, Vincent Davis <vincent@vincentdavis.net> wrote: > In the code below try is used to check if handle has the attribute name. It > seems an if statement could be used. Is there reason one way would be > better than another? http://www.oranlooney.com/lbyl-vs-eafp/
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Try: rather than if : Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-14 16:12 -0700
csiph-web