Skip to content

Commit

Permalink
Merge 4bdc1ab into db7f0af
Browse files Browse the repository at this point in the history
  • Loading branch information
msabramo committed Feb 19, 2015
2 parents db7f0af + 4bdc1ab commit 7a38e3c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.rst
Expand Up @@ -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
<funcsigs.Signature object at 0x1005edd50>
>>> sig.parameters
OrderedDict([('a', <Parameter at 0x100768310 'a'>), ('b', <Parameter at 0x1007683c0 'b'>), ('args', <Parameter at 0x100768418 'args'>), ('kwargs', <Parameter at 0x100768470 'kwargs'>)])
>>> sig.return_annotation
<class 'funcsigs._empty'>
For the details of the signature object, refer to the either the package of
standard library documentation.
Expand Down

0 comments on commit 7a38e3c

Please sign in to comment.