Without looking at the docs or implementation. What do you expect to happen when the following code handles a request?
from django.contrib.auth import login
def my_view(request):
login(request, None)
a. Logs out the current logged, or nothing if no user is logged in
b. TypeError
c. Does noting
d. It depends on the state of the request
e. AttributeError
The answer is in this Django ticket: #35530 (`django.contrib.auth.login` inconsistently guards `request.user`) – Django