4 ms·
> However, because Python does not support curly braces, it cannot directly define an empty function like other languages, that is, void test(){}. > Based on t
by Asraelite 5y ago
> However, because Python does not support curly braces, it cannot directly define an empty function like other languages, that is, void test(){}.
> Based on the above analysis, when python defines an empty function, it must have a legal function body,
I'm not sure I understand the reasoning behind this. What problems specifically would arise if you simply allowed empty functions like
def fun1():
def fun2():
Are there ambiguities that would arise?
- muzika 5y agoIt would be way too easy to make indentation bugs that are currently caught by the interpreter.