Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
93b81e1f
Commit
93b81e1f
authored
Oct 18, 2019
by
Stéphane Wirtel
Committed by
GitHub
Oct 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc: Add missing entry for functools.cached_property (GH-16803)
parent
f33c57d5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
Doc/whatsnew/3.8.rst
Doc/whatsnew/3.8.rst
+16
-0
No files found.
Doc/whatsnew/3.8.rst
View file @
93b81e1f
...
@@ -683,6 +683,22 @@ than as a function returning a decorator. So both of these are now supported::
...
@@ -683,6 +683,22 @@ than as a function returning a decorator. So both of these are now supported::
(Contributed by Raymond Hettinger in :issue:`36772`.)
(Contributed by Raymond Hettinger in :issue:`36772`.)
Added a new :func:`functools.cached_property` decorator, for computed properties
cached for the life of the instance. ::
import functools
import statistics
class Dataset:
def __init__(self, sequence_of_numbers):
self.data = sequence_of_numbers
@functools.cached_property
def variance(self):
return statistics.variance(self.data)
(Contributed by Carl Meyer in :issue:`21145`)
gc
gc
--
--
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment