PEP 318: Can't we all just get along?

Peter Hansen peter at engcorp.com
Wed Aug 18 01:36:30 CEST 2004


Paul Morrow wrote:

> Kevin Smith wrote:
>> def classmethod foo(x, y, z):
>>     pass
>>
>> That's it.  One "decorator" that is a callable object that takes a 
>> method as it's only argument.  No expressions, lists, tuples, etc.  
>> Just one callable object.  
> 
> Nope.  That's using static declarations.  We're a dynamically typed 
> language as much as possible.  Isn't there something that doesn't 
> require any additional grammar words to identify classmethods and 
> staticmethods?  

It looks to me as though Kevin is not suggesting keywords, but
callables.  In other words he would consider this valid, provided
my_own_decorator was a callable.

   def my_own_decorator foo(x, y, z):
      pass


-Peter



More information about the Python-list mailing list