From: Daniel Greenfeld Date: Sun, 18 May 2014 18:12:45 +0000 (-0700) Subject: Changes to reflect who deserves what credit. #1 X-Git-Tag: 0.1.5~10 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=23f0649f9849fdde6f8abc0f8dc23ff2b7e86511;p=cached-property.git Changes to reflect who deserves what credit. #1 --- diff --git a/README.rst b/README.rst index 04d0526..ffd395c 100644 --- a/README.rst +++ b/README.rst @@ -87,6 +87,9 @@ Why doesn't the value of `monopoly.boardwalk` change? Because it's a **cached pr Credits -------- -* Django, Werkzueg, Bottle, and Zope for having their own implementations. This package uses the Django version. -* Reinout Van Rees for pointing out the cached_property decorator to me. -* My awesome wife Audrey who created cookiecutter, which meant rolling this out took me just 15 minutes. +* Pip, Django, Werkzueg, Bottle, Pyramid, and Zope for having their own implementations. This package uses an implementation that matches the Bottle version. +* Reinout Van Rees for pointing out the `cached_property` decorator to me. +* My awesome wife `@audreyr`_ who created `cookiecutter`_, which meant rolling this out took me just 15 minutes. + +.. _`@audreyr`: https://github.com/audreyr +.. _`cookiecutter`: https://github.com/audreyr/cookiecutter \ No newline at end of file diff --git a/cached_property.py b/cached_property.py index f241a30..72ab0bb 100644 --- a/cached_property.py +++ b/cached_property.py @@ -9,7 +9,10 @@ __license__ = 'BSD' class cached_property(object): """ A property that is only computed once per instance and then replaces itself with an ordinary attribute. Deleting the attribute resets the - property. """ + property. + + Source: https://github.com/bottlepy/bottle/commit/fa7733e075da0d790d809aa3d2f53071897e6f76 + """ def __init__(self, func): self.__doc__ = getattr(func, '__doc__')