Skip to content

Commit

Permalink
Change note.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Sep 2, 2016
1 parent e5bf09e commit 02ec91c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Changes
- ``property.CachedProperty`` is usable as a decorator, with or
without dependent attribute names.

- ``method.cachedIn`` preserves the documentation string of the
underlying function, and everything else that ``functools.wraps`` preserves.

4.1.0 (2014-12-26)
------------------

Expand Down
1 change: 1 addition & 0 deletions src/zope/cachedescriptors/method.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from functools import wraps


class cachedIn(object):
"""Cached method with given cache attribute."""

Expand Down
2 changes: 1 addition & 1 deletion src/zope/cachedescriptors/method.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ computed value:
...
... @method.cachedIn('_cache')
... def distance(self, x, y):
... "Compute the distance"
... """Compute the distance"""
... print('computing distance')
... return math.hypot(self.x - x, self.y - y)
...
Expand Down
1 change: 1 addition & 0 deletions src/zope/cachedescriptors/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def __get__(self, inst, class_):

return value


def CachedProperty(*args):
"""
CachedProperties.
Expand Down

0 comments on commit 02ec91c

Please sign in to comment.