[Python-Dev] PEP 318: Let's not give in to FUD

Jeremy Hylton jeremy at alum.mit.edu
Thu Apr 1 23:28:50 EST 2004


On Thu, 2004-04-01 at 22:34, Greg Ewing wrote:
> Another thought about:
> 
>   [decorator]
>   def foo(args):
>     ...
> 
> What are newcomers going to make of this?
> 
> It looks like a thrown-away list followed by a def, and
> there's no clue that there's any connection between the
> two. 

I think it's obvious that there's a connection between the two.  A bare
list by itself would be nonsense and the actual list would probably say
something like [classmethod] which suggests it's saying something about
a method.

> And even if the newcomer suspects that there is some
> kind of connection, what are they going to look up
> in the manual?

Maybe they'll lookup functions in the reference manual?  I assume they'd
be just as puzzled by:

    def f(x, y, *args, **kwargs):

Who came up with that bizarre syntax? <wink>

Jeremy





More information about the Python-Dev mailing list