[Python-Dev] Extended Function syntax

Martin v. Löwis martin@v.loewis.de
22 Jan 2003 18:32:30 +0100


Guido van Rossum <guido@python.org> writes:

> I think the final proposal looked like this:
> 
>   def name(arg, ...) [expr, ...]:
>       ...body...
> 

I don't think there was much discussion. The suggested semantics was
that this is equivalent to

   def name(arg, ...):
     ...body...
   name=expr(name)
   ...

I *think* there was discussion as to the namespace in which expr is
evaluated, or whether certain identifiers have keyword or predefined
meaning (so you can write 'static' instead of 'staticmethod').

I don't think there was ever a complete analysis whether this syntax
meets all requirements, i.e. whether you could use it for all newstyle
features. In particular, I don't recall what the proposal was how
properties should be spelled.

Regards,
Martin