[ZCM] [ZC] 1074/ 2 Comment "Cant declare classes in Scripts with 2.7 and Python 2.3"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Mon Oct 6 10:03:36 EDT 2003


Issue #1074 Update (Comment) "Cant declare classes in Scripts with 2.7 and Python 2.3"
 Status Pending, Zope/bug medium
To followup, visit:
  http://collector.zope.org/Zope/1074

==============================================================
= Comment - Entry #2 by tim_one on Oct 6, 2003 10:03 am

On zope-dev, Fred L. Drake, Jr. said:

"""
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.
"""
________________________________________
= Request - Entry #1 by mcdonc on Oct 5, 2003 10:15 am

Jamie Heilman reports:

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.
==============================================================




More information about the Zope-Collector-Monitor mailing list