[Python-Dev] [PEP 232] Syntactic support for function attributes strawman.

Evan Simpson evan@digicool.com
Fri, 26 Jan 2001 12:12:43 -0500


From: Michael Hudson <mwh21@cam.ac.uk>
> >>> def f(a) having (publish=1):
> ...  print 1

This doesn't really need special syntax.  I would much rather have this (or
something like it) as a way of spelling initialized local variables.  That
is, when I want static local variables, instead of corrupting the function
signature by writing:

def f(x, marker=[], foo=foo)

...I could write:

def f(x) having (marker=[], foo)

Cheers,

Evan @ digicool