[Python-ideas] Definition Symmetry
Steven D'Aprano
steve at pearwood.info
Fri Feb 1 00:23:50 CET 2013
On 01/02/13 03:35, Jason Keene wrote:
> Why do function definitions require parens?
>
>>>> class MyClass:
> ... pass
> ...
>>>> def my_func:
> File "<stdin>", line 1
> def my_func:
> ^
> SyntaxError: invalid syntax
>
> This seems to me to break a symmetry with class definitions.
Why do you think that class definitions and function definitions
should be symmetrical?
--
Steven
More information about the Python-ideas
mailing list