[Python-ideas] Before and after the colon in funciton defs.

Nick Coghlan ncoghlan at gmail.com
Thu Sep 22 02:09:03 CEST 2011

On Thu, Sep 22, 2011 at 8:38 AM, Eric Snow <ericsnowcurrently at gmail.com> wrote:
> On Wed, Sep 21, 2011 at 3:59 PM, Guido van Rossum <guido at python.org> wrote:
>> Hm. I think doing this as an expression modifier is too wacky. But as
>> a statement modifier, it could fit in the lineage of global and
>> nonlocal.
> Agreed, though just for assignment statements.   Also, it may be
> confusing to allow more than one static assignment to the same name in
> the function body.  Perhaps that should be a SyntaxError.

And so we come full circle... it looks like Jan didn't have the time
to write up a PEP following the last discussion of this topic [2], so
perhaps you'd be interested in taking up the task?

FWIW, I still quite like the explicit 'atdef' keyword I suggested last
time [1] (and most of the arguments from that thread against the
'after-the-**' syntax are equally valid arguments against the '[] in
the function header' syntax from this iteration).

[1] http://mail.python.org/pipermail/python-ideas/2011-June/010565.html
[2] http://mail.python.org/pipermail/python-ideas/2011-June/010552.html


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list