def __init__(self, *_parameters, **kwargs):
        """Initialize a new L{Schema} instance.

        Any number of L{Parameter} instances can be passed. The parameter names
        are used in L{Schema.extract} and L{Schema.bundle}. For example::

          schema = Schema(name="SetName", parameters=[Unicode("Name")])

        means that the result of L{Schema.extract} would have a C{Name}
        attribute. Similarly, L{Schema.bundle} would look for a C{Name}
        attribute.

        A more complex example::

          schema = Schema(
              name="SetNames",
              parameters=[List("Names", Unicode())])

        means that the result of L{Schema.extract} would have a C{Names}
        attribute, which would itself contain a list of names. Similarly,
        L{Schema.bundle} would look for a C{Names} attribute.

        Currently all parameters other than C{parameters} have no effect; they
        are merely exposed as attributes of instances of Schema, and are able
        to be overridden in L{extend}.

        @param name: (keyword) The name of the API call that this schema
            represents. Accessible via the C{name} attribute.
        @param parameters: (keyword) The parameters of the API, as a list of
            named L{Parameter} instances.
        @param doc: (keyword) The documentation of this API Call. Accessible
            via the C{doc} attribute.
        @param result: (keyword) A description of the result of this API
            call. Accessible via the C{result} attribute.
        @param errors: (keyword) A sequence of exception classes that the API
            can potentially raise. Accessible as a L{set} via the C{errors}
            attribute.
        """
        self.name = kwargs.pop('name', None)
        self.doc = kwargs.pop('doc', None)
        self.result = kwargs.pop('result', None)
        self.errors = set(kwargs.pop('errors', []))
        if 'parameters' in kwargs:
            if len(_parameters) > 0:
                raise TypeError("parameters= must only be passed "
                                "without positional arguments")
            self._parameters = kwargs['parameters']
        else:
            self._parameters = self._convert_old_schema(_parameters)
def __init__ ( self , * _parameters , ** kwargs ) : self . name = kwargs . pop ( 'name' , None ) self . doc = kwargs . pop ( 'doc' , None ) self . result = kwargs . pop ( 'result' , None ) self . errors = set ( kwargs . pop ( 'errors' , [ ] ) ) if 'parameters' in kwargs : if len ( _parameters ) > 0 : raise TypeError ( "parameters= must only be passed " "without positional arguments" ) self . _parameters = kwargs [ 'parameters' ] else : self . _parameters = self . _convert_old_schema ( _parameters )
Initialize a new L{Schema} instance.

        Any number of L{Parameter} instances can be passed. The parameter names
        are used in L{Schema.extract} and L{Schema.bundle}. For example::

          schema = Schema(name="SetName", parameters=[Unicode("Name")])

        means that the result of L{Schema.extract} would have a C{Name}
        attribute. Similarly, L{Schema.bundle} would look for a C{Name}
        attribute.

        A more complex example::

          schema = Schema(
              name="SetNames",
              parameters=[List("Names", Unicode())])

        means that the result of L{Schema.extract} would have a C{Names}
        attribute, which would itself contain a list of names. Similarly,
        L{Schema.bundle} would look for a C{Names} attribute.

        Currently all parameters other than C{parameters} have no effect; they
        are merely exposed as attributes of instances of Schema, and are able
        to be overridden in L{extend}.

        @param name: (keyword) The name of the API call that this schema
            represents. Accessible via the C{name} attribute.
        @param parameters: (keyword) The parameters of the API, as a list of
            named L{Parameter} instances.
        @param doc: (keyword) The documentation of this API Call. Accessible
            via the C{doc} attribute.
        @param result: (keyword) A description of the result of this API
            call. Accessible via the C{result} attribute.
        @param errors: (keyword) A sequence of exception classes that the API
            can potentially raise. Accessible as a L{set} via the C{errors}
            attribute.