Arnaud Delobelle <[EMAIL PROTECTED]> writes: > Ben Finney <[EMAIL PROTECTED]> writes: > [...] > > All you need to know to understand the above is that it will have > > essentially the same result as: > > > > class A(object): > > # ... > > > > def _from_string(cls, s): > > # ... > > return cls(a, b, c) > > from_string = classmethod(_from_string) > > del _from_string > > > > without the intermediate binding of the ‘_from_string’ name. > > So you mean it is the same as: > > class A(object): > # ... > > def from_string(cls, s): > # ... > from_string = classmethod(from_string)
Sure, but I figured I would make the steps more explicit. -- \ “Writing a book is like washing an elephant: there no good | `\ place to begin or end, and it's hard to keep track of what | _o__) you've already covered.” —anonymous | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list