-
django-pictures/pictures/models.py Line 75 in acb0a0d What is the relevance of this copy? |
Beta Was this translation helpful? Give feedback.
Answered by
codingjoe
Nov 21, 2022
Replies: 1 comment 1 reply
-
Hi @1r00t, Excellent question. This is to avoid state leakage. If you iterate over all sizes and don't create a copy before applying any changes to the object, the state will leak to the next iteration of the loop. I believe this line was part of a bug fix from @vchrisb who discovered this issue. Cheers, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
1r00t
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @1r00t,
Excellent question. This is to avoid state leakage. If you iterate over all sizes and don't create a copy before applying any changes to the object, the state will leak to the next iteration of the loop.
I believe this line was part of a bug fix from @vchrisb who discovered this issue.
Cheers,
Joe