On Thu, May 21, 2020 at 9:58 PM Rhodri James <rho...@kynesim.co.uk> wrote:
>
> On 20/05/2020 23:20, James Lu wrote:
> > There's a thirty year tradition of doing that because there's no
> > terser way to do it.
>
> Terser does not mean better.  In my experience, terser code is often
> harder to comprehend, particularly when you are talking about squashing
> a couple of lines together like this.
>

Except when it's more expressive. Imagine if Python didn't have ANY
argument defaults, merely permitted you to make arguments optional:

def int(x, ?base):
    if base is UNSET:
        base = 10
    ...

Would you agree that simply writing "base=10" is better?

You're right that terser does not ALWAYS mean better, but "more
expressive" often compasses both better and terser. Terser definitely
does not mean worse.

ChrisA
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/QWLHRFFQXOSKBMCNQLBHB4TH6XOX2NZS/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to