From 23e8733e1679ea5a22aab631932630bdea8ff4cb Mon Sep 17 00:00:00 2001 From: helmutm Date: Sun, 8 Oct 2006 18:34:26 +0000 Subject: [PATCH] Added options attribute to IType git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@1394 fd906abe-77d9-0310-91a1-e0d9ade77398 --- typology/interfaces.py | 3 +++ typology/type.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/typology/interfaces.py b/typology/interfaces.py index 5d798a5..4282903 100644 --- a/typology/interfaces.py +++ b/typology/interfaces.py @@ -73,6 +73,9 @@ class IType(Interface): 'to the type. Note that this object need not ' 'provide the IType interface itself but it ' 'should be adaptable to ITypeProvider') + options = schema.Dict(title=u'Options', + description=u'A mapping of optional settings to be used for ' + 'application or environment specific purposes') # possible extensions: # subTypes # parentTypes diff --git a/typology/type.py b/typology/type.py index 624c44a..36176bc 100644 --- a/typology/type.py +++ b/typology/type.py @@ -32,9 +32,10 @@ class BaseType(object): def __init__(self, context): self.context = context + self.options = {} def __eq__(self, other): - return self.token == other.token + return IType.providedBy(other) and self.token == other.token title = u'BaseType'