The code is equivalent to:

res = self.func(instance)
instance.__dict__['self.name'] = self.func(instance)

(except that self.func(instance) isn't called twice like it would be in 
this version)

On Thursday, February 6, 2020 at 7:39:47 AM UTC-5, Akira Furude wrote:
>
> Currently I'm working on my website, and has debugging it for a while.
> Using breakpoint() function I found bug/mistake/missed error in 
> *django/utils/functional.py **cached_property.__get__(), line 48*.
> That line contains this: res = instance.__dict__[self.name] = self.func
> *(instance)*.
> May be I don't understand a lot in Python, but I think between instance.
> __dict__[self.name] and self.func*(instance)* should be check for 
> equality *(==) *statement.
> That version also proving Python interpreter itself, if you type in 
> terminal this: *print(*instance.__dict__[self.name] = self.func
> *(instance))*.
> Has attached the screenshot to proof the error.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e2a0819e-0d98-42ed-a49b-cfcea0e8ae31%40googlegroups.com.

Reply via email to