Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8378165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:51:55+00:00 2026-06-09T15:51:55+00:00

I see that python 3.2 has memoization as a decorator in functools library. http://docs.python.org/py3k/library/functools.html#functools.lru_cache

  • 0

I see that python 3.2 has memoization as a decorator in functools library.
http://docs.python.org/py3k/library/functools.html#functools.lru_cache

Unfortunately it is not yet backported to 2.7. Is there any specific reason as why it is not available in 2.7? Is there any 3rd party library providing the same feature or should I write my own?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:51:56+00:00Added an answer on June 9, 2026 at 3:51 pm

    Is there any specific reason as why it is not available in 2.7?

    @Nirk has already provided the reason: unfortunately, the 2.x line only receive bugfixes, and new features are developed for 3.x only.

    Is there any 3rd party library providing the same feature?

    repoze.lru is a LRU cache implementation for Python 2.6, Python 2.7 and Python 3.2.

    Documentation and source code are available on GitHub.

    Simple usage:

    from repoze.lru import lru_cache
    
    @lru_cache(maxsize=500)
    def fib(n):
        if n < 2:
            return n
        return fib(n-1) + fib(n-2)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I see that google app engine has now added text search: https://developers.google.com/appengine/docs/python/search/overview Does this
I always see people mention that Python binding and C Sharp binding etc. when
I've been using C/C++ and Python, but I now I see that a lot
It's not uncommon to see Python libraries that expose a universal opener function, that
Would what mentioned in the title be possible? Python module style that is. See
I see that Spring has a @Required annotation to mark member variables in beans
What version of Python is needed to run Mercurial? I see that the website
In Python it's possible to create a procedure that has no explicit return. i.e.:
I've been using Numpy's numpy.random.exponential function for a while. I now see that Python's
I have a simple class in python that has a __str__() function. Like this:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.