Exemplo n.º 1
0
 def frobber(frobber=formless.Object(interface=IFrob),
             frobee=formless.Object(IFrob)):
     """Frobber.
     
     Takes two frobs and raises one to the power of the other.
     """
     return IFrob
Exemplo n.º 2
0
 def aFrobMethod(aFrob=formless.Object(interface=IFrob)):
     """A Frob Method
     
     This method takes a frob, but there are no frob instances on this page.
     You'll have to use the shelf.
     """
     return str
Exemplo n.º 3
0
 def aBarMethod(abar=formless.Object(interface=IBar)):
     """A Bar Method
     
     This method takes a bar, but there are no bar instances on this page.
     You'll have to use the shelf.
     """
     return str
Exemplo n.º 4
0
 def someMethod(one=formless.Object(interface=IBar),
                two=formless.Integer(description="an integer please")):
     """Some Method.
     
     This method takes an IBar instance.
     """
     return None
Exemplo n.º 5
0
        class Outer(formless.TypedInterface):
            aSimpleProperty = formless.Object()

            class Inner(formless.TypedInterface):
                """Docstring
                
                This is a docstring.
                """
                anInnerProperty = formless.Integer()
Exemplo n.º 6
0
 def compoundChecker(theAnswer=CompoundChecker(
     [formless.Integer(label="six"),
      formless.Integer(label="nine")],
     label="The Answer",
     description="What is the meaning of life, the universe, and everything?"
 )):
     """The Answer
     
     Please type the integer six in the first box, and nine in the second.
     """
     return formless.Object(label="The Answer", interface=formless.Integer)
Exemplo n.º 7
0
 def whatIsMyClass(anObj=formless.Object()):
     """What is my class?
     
     Pass an object and get back the class in your hand.
     """
     return formless.Object()
Exemplo n.º 8
0
 class Test(formless.TypedInterface):
     foo = formless.String()
     bar = formless.Text()
     baz = formless.Integer()
     quux = formless.Object(interface=_indirectOther())