2015-03-22 06:18:45 +00:00
|
|
|
``funcutils`` - ``functools`` fixes
|
|
|
|
===================================
|
2015-03-22 00:12:50 +00:00
|
|
|
|
|
|
|
.. automodule:: boltons.funcutils
|
2015-04-06 01:29:02 +00:00
|
|
|
|
2016-06-08 09:23:51 +00:00
|
|
|
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:
|
|
|
|
|
2015-04-06 01:29:02 +00:00
|
|
|
Improved ``partial``
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
.. autoclass:: partial
|
|
|
|
.. autoclass:: InstancePartial
|
|
|
|
.. autoclass:: CachedInstancePartial
|
|
|
|
|
2016-06-08 09:23:51 +00:00
|
|
|
Miscellaneous metaprogramming
|
2015-04-06 01:29:02 +00:00
|
|
|
-----------------------------
|
|
|
|
|
|
|
|
.. autofunction:: copy_function
|
|
|
|
.. autofunction:: dir_dict
|
|
|
|
.. autofunction:: mro_items
|