[ZPT] ZPT for manage_addForm

Evan Simpson evan@zope.com
Wed, 27 Feb 2002 16:09:02 -0500


R. David Murray wrote:
> On 27 Feb 2002, Michael R. Bernstein wrote:
>>Hmm. It derives it from the filename, rather than from the assignment?
> 
> I think it can't know the name of the local variable to which
> it is being assigned.  This is a python limitation.

When you use one in a class, and don't provide an explicit __name__ 
argument, the class initialization will assign __name__ based on the 
attribute name.

Since constructors are not class attributes, they weren't getting a 
__name__ unless you gave them one.

Cheers,

Evan @ Zope