PEP 318 - Function Modifier Syntax

Roman Suzi rnd at onego.ru
Mon Jun 9 13:12:13 EDT 2003


On 9 Jun 2003, Kevin Smith wrote:

>This is the first draft of a PEP describing new syntax for applying 
>function modifiers (e.g. classmethod, staticmethod, etc).  There is 
>currently no implementation of the proposed syntax (I have heard rumors 
>that the 'def foo(self) [...]' syntax has a patch somewhere, but I 
>haven't seen it yet).  I have already received a few comments and will 
>revise the document soon.  The latest version will always be available 
>at http://www.python.org/peps/pep-0318.html.
>
>
>        def classmethod foo(self):
>            perform method operation 

oh no... I hope Python will not be another Java. I think current

f = something(f)
is much better. Maybe

f.set_lock(lock)

or something like this could be more torelable than what the PEP proposes.
Or better yet multiline lambda ;-)

f = something(something2(lambda x:
   here we go
))

Python is language of least surprise, isn't it? So why invent
awkward syntax when functional notation is already there?

Sincerely yours, Roman Suzi
-- 
rnd at onego.ru =\= My AI powered by GNU/Linux RedHat 7.3






More information about the Python-list mailing list