[Zope3-checkins] CVS: Zope3/src/zope/app/form - widget.py:1.3
Steve Alexander
steve@cat-box.net
Tue, 31 Dec 2002 06:07:11 -0500
Update of /cvs-repository/Zope3/src/zope/app/form
In directory cvs.zope.org:/tmp/cvs-serv9260/src/zope/app/form
Modified Files:
widget.py
Log Message:
Tidied source code. Removed unused imports.
=== Zope3/src/zope/app/form/widget.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/form/widget.py:1.2 Wed Dec 25 09:12:52 2002
+++ Zope3/src/zope/app/form/widget.py Tue Dec 31 06:07:10 2002
@@ -15,15 +15,13 @@
$Id$
"""
from zope.app.interfaces.forms import IWidget
-from zope.schema.interfaces import ValidationError
-from zope.app.interfaces.forms import WidgetInputError
from zope.component.interfaces import IViewFactory
-class Widget(object):
+__metaclass__ = type
+
+class Widget:
"""Mix-in class providing some functionality common accross view types
"""
-
-
__implements__ = IWidget
_prefix = 'field.'
@@ -55,13 +53,13 @@
raise TypeError("haveData has not been implemented")
def getData(self):
- raise TypeError("haveData has not been implemented")
+ raise TypeError("getData has not been implemented")
title = property(lambda self: self.context.title)
required = property(lambda self: self.context.required)
-class CustomWidget(object):
+class CustomWidget:
"""Custom Widget."""
__implements__ = IViewFactory