summaryrefslogtreecommitdiff
path: root/src/zope/interface/declarations.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/zope/interface/declarations.py')
-rw-r--r--src/zope/interface/declarations.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/zope/interface/declarations.py b/src/zope/interface/declarations.py
index 0992adc..06b1688 100644
--- a/src/zope/interface/declarations.py
+++ b/src/zope/interface/declarations.py
@@ -49,6 +49,15 @@ _ADVICE_ERROR = ('Class advice impossible in Python3. '
_ADVICE_WARNING = ('The %s API is deprecated, and will not work in Python3 '
'Use the @%s class decorator instead.')
+class named(object):
+
+ def __init__(self, name):
+ self.name = name
+
+ def __call__(self, ob):
+ ob.__component_name__ = self.name
+ return ob
+
class Declaration(Specification):
"""Interface declarations"""