A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-February/033425.html below:

"then" "else" for deprecating "and" "or" side effects

[Python-Dev] PEP 308: "then" "else" for deprecating "and" "or" side effects [Python-Dev] PEP 308: "then" "else" for deprecating "and" "or" side effectsLalo Martins lalo@laranja.org
Fri, 14 Feb 2003 14:48:07 -0200
On Fri, Feb 14, 2003 at 04:17:17AM +0100, Christian Tismer wrote:
> 
>     arg = arg then 42 else "Default"
>     arg = arg else "Default"
>     arg = arg then 42

I feel the "then" above reads very funny; besides, as it isn't currently in
python, it means a new keyword.  Guido's proposal reads better, despite the
funny ordering:

arg = 42 if arg else "Default"

If you have an idea of how to disambiguate it, then we could augment his
with your binary ideas:

arg = arg else "Default"
arg = 42 if arg

[]s,
                                               |alo
                                               +----
--
            Those who trade freedom for security
               lose both and deserve neither.
--
http://www.laranja.org/                mailto:lalo@laranja.org
         pgp key: http://www.laranja.org/pessoal/pgp

Eu jogo RPG! (I play RPG)         http://www.eujogorpg.com.br/
GNU: never give up freedom                 http://www.gnu.org/



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4