News for hackers. Stuff that matters.
Re:PEP 505: Bringing None-Aware Operators to Python by CurlyJefferson on Saturday August 11, 2018 @09:53PM (#17742537)
"Stop trying to shorten code by 2 lines."

Agreed. Python code tends to be concise as is. There's no need to add little tricks to cut out a line or two at the expense of readability.

Along those lines, in a recent code review a developer balked at some proposed code and boasted how he could do the same thing in fewer lines. His "improved" code had a keyword parameter where the default was set to a lambda function containing nested list comprehensions plus a zip function... I voted against his "improvement" since it was the most unpythonic thing I'd ever seen. I'll take added readability and simplicity at the expense of a few extra lines.

Re:PEP 505: Bringing None-Aware Operators to Python by talltimtom on Sunday August 12, 2018 @11:24AM (#17744725)
> Agreed. Python code tends to be concise as is. There's no need to add little tricks to cut out a line or two at the expense of readability.

I must say I agree fully, and even so, in cases where you really want to cut down verbose sections or boilerplate, there is so much you can do through defining your own classes and functions and overloading operators. Even then there is little need for new fundamental syntax.