File: funcutils.rst

package info (click to toggle)
python-boltons 18.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,104 kB
  • sloc: python: 10,216; makefile: 159
file content (40 lines) | stat: -rw-r--r-- 984 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
``funcutils`` - ``functools`` fixes
===================================

.. automodule:: boltons.funcutils

Decoration
----------

`Decorators`_ are among Python's most elegant and succinct language
features, and boltons adds one special function to make them even more
powerful.

.. _Decorators: https://en.wikipedia.org/wiki/Python_syntax_and_semantics#Decorators

.. autofunction:: wraps

Function construction
---------------------

Functions are so key to programming in Python that there will even
arise times where Python functions must be constructed in
Python. Thankfully, Python is a dynamic enough to make this
possible. Boltons makes it easy.

.. autoclass:: FunctionBuilder
   :members:

Improved ``partial``
--------------------

.. autoclass:: partial
.. autoclass:: InstancePartial
.. autoclass:: CachedInstancePartial

Miscellaneous metaprogramming
-----------------------------

.. autofunction:: copy_function
.. autofunction:: dir_dict
.. autofunction:: mro_items