~speijnik/python-argvalidate/devel

« back to all changes in this revision

Viewing changes to doc/argvalidate.rst

  • Committer: Stephan Peijnik
  • Date: 2010-04-23 18:10:11 UTC
  • Revision ID: debian@sp.or.at-20100423181011-u1uo3ui7do6qw7gm
Initial import from HG tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. _argvalidate-module:
 
2
 
 
3
argvalidate Module
 
4
==================
 
5
 
 
6
.. automodule:: argvalidate
 
7
 
 
8
Below you can find the documentation of the public API of argvalidate.
 
9
 
 
10
Even though more constants, decorators, exceptions and functions may be
 
11
specified in the argvalidate module, only those described here form the API 
 
12
and are intended for public use.
 
13
 
 
14
.. note::
 
15
 
 
16
   Do *not* rely on any internals of argvalidate, as these may change at any 
 
17
   time, without further notice. 
 
18
 
 
19
   The API described here forms the public interface to argvalidate and as such
 
20
   will have functionality pending for removal deprecated first.
 
21
 
 
22
Decorators
 
23
----------
 
24
 
 
25
.. autofunction:: accepts
 
26
.. autofunction:: returns
 
27
 
 
28
.. note::
 
29
 
 
30
    Stacking of decorator of the same type (ie. :func:`accepts`
 
31
    and :func:`accepts`, :func:`returns` and :func:`returns`) is not possible
 
32
    and will cause a :exc:`DecoratorStackingException` to be raised.
 
33
 
 
34
    Stacking of different types of decorators (ie. :func:`returns` and
 
35
    :func:`accepts`)
 
36
    is possible though and will neither raise an exception nor break anything.
 
37
 
 
38
.. autofunction:: func_args
 
39
.. autofunction:: method_args
 
40
.. autofunction:: return_value
 
41
 
 
42
 
 
43
Helpers
 
44
-------
 
45
 
 
46
.. autofunction:: one_of
 
47
.. autofunction:: raises_exceptions
 
48
.. autofunction:: warns_kwarg_as_arg
 
49
 
 
50
 
 
51
.. _argvalidate-exceptions:
 
52
 
 
53
Exceptions
 
54
----------
 
55
.. autoexception:: ArgvalidateException
 
56
 
 
57
.. autoexception:: ArgumentTypeException
 
58
.. autoexception:: ReturnValueTypeException
 
59
.. autoexception:: DecoratorNonKeyLengthException
 
60
.. autoexception:: DecoratorKeyUnspecifiedException
 
61
.. autoexception:: DecoratorStackingException