You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Line 93 says no matter whether it was initially empty, but lines 88 through 91 seem to have already dealt with the "initially empty" case without removing the cookie or clearing the storage. This made me unsure as to what the comment on line 93 means.
initially_empty is True when session data is not loaded from the storage. In this case, we just do nothing.
In the next lines, we work with session data loaded from the storage or modified via request.session. This data can be empty {} which means that we can destroy session and remove the cookie.
initially_empty seems to be set True at then end of the handler's load method, in the case where the storage was empty. It makes sense to me that in that case we do nothing.
In the next lines, the load method must have initially seen data, setting initially_empty to False. What do the words in the comment on line 93 (no matter whether it was initially empty) mean, since the data was not initially empty here? It seems that the session data could only have been cleared or otherwise emptied by the user.
In other words, it seems that by line 93, the session data was loaded, was not empty, and then became empty. The use of the phrase "initially empty" here seems confusing, and seems to refer to the case already handled at lines 88-91.
Line 93 says
no matter whether it was initially empty
, but lines 88 through 91 seem to have already dealt with the "initially empty" case without removing the cookie or clearing the storage. This made me unsure as to what the comment on line 93 means.starsessions/starsessions/middleware.py
Lines 87 to 95 in af1c557
The text was updated successfully, but these errors were encountered: