Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #81809

Re: Proposed new conditional operator: "or else"

From Marko Rauhamaa <marko@pacujo.net>
Newsgroups comp.lang.python
Subject Re: Proposed new conditional operator: "or else"
Date 2014-12-02 20:39 +0200
Organization A noiseless patient Spider
Message-ID <8761dtuc9d.fsf@elektro.pacujo.net> (permalink)
References <C2BEED98-4CCA-4EDE-8FDF-F235B478055C@panix.com> <CAKJDb-NpPbsHgQw5PVtjyK352=zuSBeXJD_+dH5GH3niQDaSOQ@mail.gmail.com> <mailman.16499.1417544855.18130.python-list@python.org>

Show all headers | View raw


Tim Chase <python.list@tim.thechases.com>:

>> >    foo == 42 or else
>
> In light of the parallel thread discussing the "assert" statement and
> the perils of trusting it to be present even though it can be
> optimized away, this "or else" could be (in the altered words of Don
> Corleone), "I'm gonna make an assertion he can't refuse."

I would consider vain threats an antipattern.


Marko

Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: Proposed new conditional operator: "or else" Tim Chase <python.list@tim.thechases.com> - 2014-12-02 12:30 -0600
  Re: Proposed new conditional operator: "or else" Marko Rauhamaa <marko@pacujo.net> - 2014-12-02 20:39 +0200

csiph-web