Proposed new conditional operator: "or else"

Marko Rauhamaa marko at pacujo.net
Tue Dec 2 13:39:42 EST 2014


Tim Chase <python.list at 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



More information about the Python-list mailing list