-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
functools.cached_property
backport (#5031)
The [`@functools.cached_property`](https://docs.python.org/3/library/functools.html#functools.cached_property) decorator is really useful but not currently available in cirq since it was introduced in python 3.8 but we still support python 3.7. This adds `backports.cached_property` to make cached properties available in python 3.7, using import logic in `cirq._compat` to get it from the standard library or backport module, as needed.
- Loading branch information
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters