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


Groups > comp.lang.python > #81809

Re: Proposed new conditional operator: "or else"

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Marko Rauhamaa <marko@pacujo.net>
Newsgroups comp.lang.python
Subject Re: Proposed new conditional operator: "or else"
Date Tue, 02 Dec 2014 20:39:42 +0200
Organization A noiseless patient Spider
Lines 13
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>
Mime-Version 1.0
Content-Type text/plain
Injection-Info mx02.eternal-september.org; posting-host="ff5cf27ef3d5b31f034d3b72bdc27a41"; logging-data="26373"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/PeZwlbiaPWy8XZIFGijr1"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Cancel-Lock sha1:zXAWUC7Y04pyUx16MOi+ECEcIjE= sha1:L24tEd6r43Ae12UWo3V2ch33XuE=
Xref csiph.com comp.lang.python:81809

Show key headers only | 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