We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See also https://code.djangoproject.com/ticket/29478#ticket
import itertools from cached_property import cached_property count = itertools.count() count2 = itertools.count() count3 = itertools.count() class Foo: @cached_property def __foo(self): return next(count) @cached_property def foo2(self): return next(count2) @property def foo3(self): return next(count3) def run(self): print('foo', self.__foo) print('foo', self.__foo) print('foo', self.__foo) print('foo', self.__foo) print('foo2', self.foo2) print('foo2', self.foo2) print('foo2', self.foo2) print('foo2', self.foo2) print('foo2', self.foo2) print('foo3', self.foo3) print('foo3', self.foo3) print('foo3', self.foo3) print('foo3', self.foo3) print('foo3', self.foo3) Foo().run() """ python cached_property_test.py foo 0 foo 1 foo 2 foo 3 foo2 0 foo2 0 foo2 0 foo2 0 foo2 0 foo3 0 foo3 1 foo3 2 foo3 3 foo3 4 """
The text was updated successfully, but these errors were encountered:
Here's a django PR that fixes it: django/django#10033
Sorry, something went wrong.
@graingert, would you or anyone else like to open a pull request to support this here?
Can cached properties with mangled names
dc21aa0
Fixes pydanny#102
Can cache properties with mangled names
c044981
0216c6a
Successfully merging a pull request may close this issue.
See also https://code.djangoproject.com/ticket/29478#ticket
The text was updated successfully, but these errors were encountered: