On Mon, Jul 23, 2018 at 2:23 AM Nicholas Cole <nicholas.c...@gmail.com> wrote:
> One issue for me is that the trivial case is already a one-liner: > > if a is None: a = 10 > Yes, if you have no indentation and a 1-character name, then it fits on a single line. If you have a longer expression and/or side effects, then it's not a one-liner anymore. > And that leads to a simple question: how many times does this actually > occur in real-world by python code? -- i.e. how many times do I want > to check the value of an existing label, and, finding it is None (and > None specifically), then assign it a value? > > What does a scan through the existing core library say? Please read the PEP before you shoot it down. It answers this _exact_ question.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/