[Zope-dev] Re: [Zope] Using 2.3.2 for Zope 2.7

Fred L. Drake, Jr. fred at zope.com
Mon Oct 6 09:56:15 EDT 2003


On Fri, 2003-10-03 at 17:27, Jamie Heilman wrote:
 > In 2.3 you can no longer declare new classes in a Script object.  It
 > bitches about a lack of __name__ attribute.  I haven't really had the
 > time to look into it closely, but it does effect the examples shipped
 > with zope, and actually its just a very useful thing to be able to do.
 > Whatever this problem stems from, there will probably be more because
 > of it.

In Python 2.3.x, when a class is defined the __name__ of the
encompassing module is looked up.  I suspect Python Scripts can be
fixed by defining __name__ in the globals dictionary in which the code
is executed.


  -Fred

-- 
Fred L. Drake, Jr.  <fred at zope.com>
PythonLabs at Zope Corporation



More information about the Zope-Dev mailing list