This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients Omer.Katz, eric.araujo, madison.may, pitrou, pydanny, r.david.murray, rhettinger, serhiy.storchaka, vstinner
Date 2014-05-18.22:36:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1400452615.82.0.76419705996.issue21145@psf.upfronthosting.co.za>
In-reply-to
Content
Does this work for you?

>>> class X:
...   @property
...   @functools.lru_cache(None)
...   def get_x(self):
...     print("computing")
...     return 5
... 
>>> x = X()
>>> x.get_x
computing
5
>>> x.get_x
5
History
Date User Action Args
2014-05-18 22:36:55pitrousetrecipients: + pitrou, rhettinger, vstinner, pydanny, eric.araujo, r.david.murray, serhiy.storchaka, madison.may, Omer.Katz
2014-05-18 22:36:55pitrousetmessageid: <1400452615.82.0.76419705996.issue21145@psf.upfronthosting.co.za>
2014-05-18 22:36:55pitroulinkissue21145 messages
2014-05-18 22:36:55pitroucreate