Tres Seaver wrote at 2005-5-27 08:22 -0400: > ... >As a local patch, this isn't too bad (one could even package it as a >do-nothing-after-initialization product). However, no redistributed >product code should rely on the presence of a patched 'hasattr', but >should use the 3 argument getattr instead.
I think this is *very* bad! It is quite difficult to get the "hasattr" emulation via "getattr" correct. If you do not like a modified "__builtin__.hasattr" (which I can understand), then provide at least a "__builtin__.zhasattr" (or similarly named) available in restricted code and strongly recommend in the documentation to use this variant of "hasattr" for any Zope/ZODB object. -- Dieter _______________________________________________ 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 )