Jerry wrote:
> Thanks to everyone that resonded.  I will have to spend some time
> reading the information that you've provided.
>
> To Fredrik, unfortunately yes.  I saw the examples, but couldn't get my
> head wrapped around their purpose.

You're probably looking at the newfangled @decorator syntax.

Things were a lot clearer when decorators were called explicitly:

class foo(object):
   def bar(self):
      ...
   bar = classmethod(bar)

That makes it a lot more obvious that classmethod is simply a
higher-order function (that is, it takes a function as an argument and
returns a function).

It is equivalent to the newer:

class foo(object):
   @classmethod
   def bar(self):
      ...

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to