Richard Jones wrote at 2003-7-1 12:03 +1000:
 > ...
 > PageTemplateFile (via Script and SimpleItem) inherits Item. This class 
 > has an attribute "id" set to '' by default. PageTemplateFiles don't use 
 > "id" though, they use __name__. The getId implementation that 
 > PageTemplateFiles use has some mention of __name__ in it, but it'll 
 > never get used because:
 > 
 >      id = ''
 >      def getId(self):
 >          name=getattr(self, 'id', None)
 >          if callable(name):
 >              return name()
 >          if name is not None:
 >              return name
 >          if hasattr(self, '__name__'):
 >              return self.__name__
 >          raise AttributeError, 'This object has no id'

This is funny code indeed...

   Obviously, the code starting with line 4 in the function
   can only be executed by hackers.

Please file a bug report.


Dieter

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
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