Dieter Maurer wrote:
I strongly argue against it. Fix "hasattr" in the Zope context,
instead!


      _marker = []
      def hasattr(obj, attr, marker):
          a = getattr(obj, attr, _marker)
          return a is not _marker

      import __builtin__
      __builtin__.hasattr = hasattr

Easy enough, isn't it?

Way easier than to change "hasattr" anywhere it is now used.

Anyone think putting this in Zope core is a good idea?

If so, where should it go?
Any potential performance implications people can think of?

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk

_______________________________________________
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