<div dir="ltr">Just to be clear, I wasn't suggesting forcing parens for class definitions. Rather make them optional for functions!<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 31, 2013 at 11:35 AM, Jason Keene <span dir="ltr"><<a href="mailto:jasonkeene@gmail.com" target="_blank">jasonkeene@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Why do function definitions require parens?<br><br><div style="margin-left:40px"><span style="font-family:courier new,monospace">>>> class MyClass:<br>
... pass<br>... <br>>>> def my_func:<br>
File "<stdin>", line 1<br> def my_func:<br> ^<br>SyntaxError: invalid syntax<br></span></div><br></div>This seems to me to break a symmetry with class definitions. I assume this is just a hold off from C, perhaps there is a non-historical reason tho.<br>
<br>I believe in the past we've forced parens in list comprehensions to create a symmetry between comprehensions/generator expressions. Why not for this?<br></div>
</blockquote></div><br></div>