diff --git a/README.rst b/README.rst index f04b7b4..fb79dbc 100644 --- a/README.rst +++ b/README.rst @@ -18,13 +18,21 @@ Example ------- To obtain a signature object, pass the target function to the -``funcsigs.signature`` function. :: +``funcsigs.signature`` function. + +.. code-block:: python >>> from funcsigs import signature >>> def foo(a, b=None, *args, **kwargs): ... pass - + ... >>> sig = signature(foo) + >>> sig + + >>> sig.parameters + OrderedDict([('a', ), ('b', ), ('args', ), ('kwargs', )]) + >>> sig.return_annotation + For the details of the signature object, refer to the either the package of standard library documentation.