File: README.rst

package info (click to toggle)
backports.functools-lru-cache 1.5-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 152 kB
  • sloc: python: 206; makefile: 10
file content (23 lines) | stat: -rw-r--r-- 924 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
.. image:: https://img.shields.io/pypi/v/backports.functools_lru_cache.svg
   :target: https://pypi.org/project/backports.functools_lru_cache

.. image:: https://img.shields.io/pypi/pyversions/backports.functools_lru_cache.svg

.. image:: https://img.shields.io/travis/jaraco/backports.functools_lru_cache/master.svg
   :target: https://travis-ci.org/jaraco/backports.functools_lru_cache

.. .. image:: https://readthedocs.org/projects/backportsfunctools_lru_cache/badge/?version=latest
..    :target: https://backportsfunctools_lru_cache.readthedocs.io/en/latest/?badge=latest

Backport of functools.lru_cache from Python 3.3 as published at `ActiveState
<http://code.activestate.com/recipes/578078/>`_.

Usage
=====

Consider using this technique for importing the 'lru_cache' function::

    try:
        from functools import lru_cache
    except ImportError:
        from backports.functools_lru_cache import lru_cache