mirror of
https://github.com/django/django.git
synced 2025-09-18 00:10:22 +00:00
Fixed #25611 -- Standardized descriptor signatures.
This commit is contained in:
parent
34af2bc523
commit
0b5d32faca
11 changed files with 28 additions and 28 deletions
|
@ -27,7 +27,7 @@ class cached_property(object):
|
|||
self.__doc__ = getattr(func, '__doc__')
|
||||
self.name = name or func.__name__
|
||||
|
||||
def __get__(self, instance, type=None):
|
||||
def __get__(self, instance, cls=None):
|
||||
if instance is None:
|
||||
return self
|
||||
res = instance.__dict__[self.name] = self.func(instance)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue