[Python-ideas] Allow not in lambda expressions

Inada Naoki songofacandy at gmail.com
Wed Mar 27 02:28:43 EDT 2019


Do you mean "is not"?

On Wed, Mar 27, 2019 at 3:24 PM Abdur-Rahmaan Janhangeer <
arj.python at gmail.com> wrote:

> Suppose i have
>
> (lambda x: x if x != None else '')(someVar)
>
> returning an empty string if none
>
> but, if "not" was allowed
>
> (lambda x: x if x not None else '')(someVar)
>
> it might have been more elegant
>
> PROPOSAL: Allow "not" in lambda expressions
>
> --
> Abdur-Rahmaan Janhangeer
> Mauritius
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Garanti
> sans virus. www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
> <#m_2517025322762206080_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>


-- 
Inada Naoki  <songofacandy at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20190327/56a56eb0/attachment.html>


More information about the Python-ideas mailing list