Zope Subversion Repository

  Zope

Zope: martian/trunk/src/martian/directive.txt

Diff for /martian/trunk/src/martian/directive.txt between version 86732 and 87131

version 86732, Wed May 14 15:57:19 2008 UTC version 87131, Tue Jun 3 17:42:05 2008 UTC
Line 541 
Line 541 
     ...      ...
   GrokImportError: The 'iface' directive can only be called with an interface.    GrokImportError: The 'iface' directive can only be called with an interface.
   
   The ``validateClass`` validator only accepts a class::
   
     >>> from martian import validateClass
     >>> class klass(Directive):
     ...    scope = CLASS
     ...    store = ONCE
     ...    validate = validateClass
   
     >>> class Foo(object):
     ...    klass(Bar)
   
   But it won't work with an interface or other things::
   
     >>> class Foo(object):
     ...    klass(IBar)
     Traceback (most recent call last):
       ...
     GrokImportError: The 'klass' directive can only be called with a class.
   
     >>> class Foo(object):
     ...    klass(Bar())
     Traceback (most recent call last):
       ...
     GrokImportError: The 'klass' directive can only be called with a class.
   
 Declaring base classes  Declaring base classes
 ----------------------  ----------------------
   


Generate output suitable for use with a patch program
Legend:
Removed from v.86732  
changed lines
  Added in v.87131

webmaster@zope.org

Powered by ViewCVS 1.0-dev
(Powered by Apache)

ViewCVS and CVS Help