<p>Could you elaborate on what would be wrong if function definitions ended only after an explicitly less indented line? The only problem that comes to mind is global scope "if" statements that wouldn't execute when expected (we actually might need to terminate them with a dedented "pass").</p>
<div class="gmail_quote">On Sep 24, 2011 4:26 AM, "Georg Brandl" <<a href="mailto:g.brandl@gmx.net">g.brandl@gmx.net</a>> wrote:<br type="attribution">> Am 24.09.2011 01:32, schrieb Guido van Rossum:<br>
>> On Fri, Sep 23, 2011 at 4:25 PM, anatoly techtonik <<a href="mailto:techtonik@gmail.com">techtonik@gmail.com</a>> wrote:<br>>>> Currently if you work in console and define a function and then<br>>>> immediately call it - it will fail with SyntaxError.<br>
>>> For example, copy paste this completely valid Python script into console:<br>>>><br>>>> def some():<br>>>> print "XXX"<br>>>> some()<br>>>><br>>>> There is an issue for that that was just closed by Eric. However, I'd<br>
>>> like to know if there are people here that agree that if you paste a<br>>>> valid Python script into console - it should work without changes.<br>>> <br>>> You can't fix this without completely changing the way the interactive<br>
>> console treats blank lines. None that it's not just that a blank line<br>>> is required after a function definition -- you also *can't* have a<br>>> blank line *inside* a function definition.<br>
> <br>> While the former could be changed (I think), the latter certainly cannot.<br>> So it's probably not worth changing established behavior.<br>> <br>> Georg<br>> <br>> _______________________________________________<br>
> Python-Dev mailing list<br>> <a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>> <a href="http://mail.python.org/mailman/listinfo/python-dev">http://mail.python.org/mailman/listinfo/python-dev</a><br>
> Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/ubershmekel%40gmail.com">http://mail.python.org/mailman/options/python-dev/ubershmekel%40gmail.com</a><br></div>