[Python-ideas] Make parenthesis optional in parameterless functions definitions

Eric V. Smith eric at trueblade.com
Fri Apr 1 01:46:36 EDT 2016

On 3/31/2016 8:43 PM, Steven D'Aprano wrote:
> This matter boils down to a question of taste. You apparently don't like 
> the look of "def spam()", I do. I think my experience supports the 
> current requirement, you think that it hurts readability, I don't. 
> Unless you can give some objective evidence that it hurts readability, 
> you aren't going to convince me.

In addition to all of Steven's points, it's just way, way to late for
this change.

I don't see us ever changing Python to allow (or require!) you to omit
the parens on a function definition with no parameters. For backward
compatibility, you'd have to allow the parens. And then what's the point
in having two ways to do the same thing? You'd just be creating confusion.


More information about the Python-ideas mailing list