Tres Seaver <[EMAIL PROTECTED]> schrieb:

> Dieter Maurer wrote:
> >      class C(object):
> >        implements(I)
> >        m = property(lambda self: lambda ...: ...)
> > 
> > 
> > i.e. when a method (declared by the interface) is implemented by a property.
> 
> Why would I want to do that, rather than using 'def m(self):'?

- to win an obfucated-code contest
- to get an additional closure for the method that is created each time
  the method is accessed


Viele Grüße,
Thomas Lotze

-- 
Thomas Lotze · [EMAIL PROTECTED]
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to