On Wed, Sep 27, 2017 at 6:00 AM, Stefan Ram <r...@zedat.fu-berlin.de> wrote: > r...@zedat.fu-berlin.de (Stefan Ram) writes: >>Stefan Behnel <stefan...@behnel.de> writes: >>>But would you also write this? > ... >>> def(func(a,b,c)): >>> return(a+b+c) >>No, this not. > > What I wrote was like: > > func( a, b, c ) > return a+b+c > > Python could have taken the indentation of the > next line to tell that this is supposed to be > a function definition and not a function call. > > I forgot »:« and »def«, and sometimes I forget > other things, but I never forgot the proper > indentation, never got the indentation wrong > so far, not even once.
That's a DWIMmy feature, and those are often *bad* in language design. But if you can pin down your exact style (as here - you ALWAYS get the indentation right), you could - in theory, at least - configure your editor to notice that you left out the "def" and the colon, and add them for you. Definitely wants to be an editor feature though. ChrisA -- https://mail.python.org/mailman/listinfo/python-list