Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83447
| Path | csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.007 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'true,': 0.05; 'socket': 0.07; '"if': 0.09; 'cc:addr:python-list': 0.11; 'jan': 0.12; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'not,': 0.20; 'cc:addr:python.org': 0.22; 'instance,': 0.24; 'paul': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'object.': 0.31; 'safely': 0.31; 'writes:': 0.31; 'option': 0.32; 'maybe': 0.34; 'received:google.com': 0.35; 'object,': 0.36; 'either': 0.39; 'name': 0.63; '2015': 0.84; 'to:none': 0.92 |
| 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:cc :content-type; bh=OVhiLcKalkPL088s2zHwTCh3YaFVq+Hz/5fOI9w2Fn0=; b=m40ISdDucwDz7Y9lLOqHDxD40Wa4KXsffUa/waFrLIHX9fva61A2pA+tj0vwCfXhR8 FUFZ1ZibhVL0N/BNOocQ9LwmjRMnIhCrLRkgQia5iG/sOTA9u3txTjHLPaWTywMPJ4Ik 82X9IRwceAXgeLDBItKXh+vxE1yzTaKzQyrCaRBBuzv7kSxMTwLavEPivmBe5ng/EynW K3YEMxxahd0+u424/CDUfZl8GRjHFUhf0Ldn+cd5Jq6hyNB/mu35wVUb6TtFTxShJOYX Dy4Q3PzNoHkOsM7bOi8tPERImasOEGG+rlTq4FT9tIfTkoh05GEI7xugoI5ZY0b51rIj qLFQ== |
| MIME-Version | 1.0 |
| X-Received | by 10.50.79.161 with SMTP id k1mr2950792igx.14.1420816498914; Fri, 09 Jan 2015 07:14:58 -0800 (PST) |
| In-Reply-To | <87lhlcro2s.fsf@jester.gateway.sonic.net> |
| References | <54ABB88A.7070504@r3dsolutions.com> <54ABC52A.1050507@davea.name> <54ABE383.3020801@r3dsolutions.com> <54ABEAD9.8070000@davea.name> <mailman.17424.1420596200.18130.python-list@python.org> <54ace9f0$0$2738$c3e8da3$76491128@news.astraweb.com> <87tx02gb9d.fsf@elektro.pacujo.net> <54adc53c$0$12999$c3e8da3$5496439d@news.astraweb.com> <877fwx3i8f.fsf@elektro.pacujo.net> <CALwzidkn5E3uxQ3Et9r-0_WUTjPLfHtY7mqwnhNVe2MGCi528Q@mail.gmail.com> <mailman.17483.1420742711.18130.python-list@python.org> <54afc949$0$12985$c3e8da3$5496439d@news.astraweb.com> <mailman.17524.1420807429.18130.python-list@python.org> <87lhlcro2s.fsf@jester.gateway.sonic.net> |
| Date | Sat, 10 Jan 2015 02:14:58 +1100 |
| Subject | Re: Comparisons and sorting of a numeric class.... |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| 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 | <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> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.17528.1420816507.18130.python-list@python.org> (permalink) |
| Lines | 12 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1420816507 news.xs4all.nl 2972 [2001:888:2000:d::a6]:37193 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:83447 |
Show key headers only | View raw
On Sat, Jan 10, 2015 at 2:06 AM, Paul Rubin <no.email@nospam.invalid> wrote: > Chris Angelico <rosuav@gmail.com> writes: >> for instance, I might have a socket object, and I might not, so I can >> use "if not self.socket: self.connect()" ... > > This sounds like you want a Maybe or Option object. That's exactly what it is - a name that's always bound to either None or a socket object. Since a socket object is always true, I can safely use the above code. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Comparisons and sorting of a numeric class.... Andrew Robinson <andrew3@r3dsolutions.com> - 2015-01-06 18:01 -0800
Re: Comparisons and sorting of a numeric class.... Steven D'Aprano <steve@pearwood.info> - 2015-01-07 08:10 +0000
Re: Comparisons and sorting of a numeric class.... Chris Angelico <rosuav@gmail.com> - 2015-01-07 19:21 +1100
Re: Comparisons and sorting of a numeric class.... Marko Rauhamaa <marko@pacujo.net> - 2015-01-07 12:01 +0200
Re: Comparisons and sorting of a numeric class.... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-01-08 10:46 +1100
Re: Comparisons and sorting of a numeric class.... Marko Rauhamaa <marko@pacujo.net> - 2015-01-08 08:21 +0200
Re: Comparisons and sorting of a numeric class.... Ian Kelly <ian.g.kelly@gmail.com> - 2015-01-08 07:57 -0700
Re: Comparisons and sorting of a numeric class.... Marko Rauhamaa <marko@pacujo.net> - 2015-01-08 21:41 +0200
Re: Comparisons and sorting of a numeric class.... Chris Kaynor <ckaynor@zindagigames.com> - 2015-01-08 10:44 -0800
Re: Comparisons and sorting of a numeric class.... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-01-09 23:27 +1100
Re: Comparisons and sorting of a numeric class.... Chris Angelico <rosuav@gmail.com> - 2015-01-09 23:43 +1100
Re: Comparisons and sorting of a numeric class.... Marko Rauhamaa <marko@pacujo.net> - 2015-01-09 16:28 +0200
Re: Comparisons and sorting of a numeric class.... Paul Rubin <no.email@nospam.invalid> - 2015-01-09 07:06 -0800
Re: Comparisons and sorting of a numeric class.... Chris Angelico <rosuav@gmail.com> - 2015-01-10 02:14 +1100
Re: Comparisons and sorting of a numeric class.... Marko Rauhamaa <marko@pacujo.net> - 2015-01-09 17:16 +0200
csiph-web