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

Greg Ewing greg at cosc.canterbury.ac.nz
Thu Apr 1 22:34:10 EST 2004

Another thought about:

  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. And even if the newcomer suspects that there is some
kind of connection, what are they going to look up
in the manual?

At least with

  def foo(args) [decorator]:

it's clear that (1) something different is going on, and
(2) it's somehow a part of the 'def' statement.

Everywhere else in Python where you can say


it means "do something and then do someotherthing", and
the combined result can be deduced from knowing what
something and someotherthing each do on their own.
This breaks that.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list