какой метод красивее и понятнее?

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
def is_manager(self, user):
admin_users = [temp.user_id for temp in self.get_temp_managers()]
return user.is_authenticated() and \
(self.user_id == user.id or user.is_superuser or user.id in admin_users)
def is_manager(self, user):
if not user.is_authenticated():
return False
if user.is_superuser:
return True
if user.id == self.user_id:
return True
return user.id in (temp.user_id for temp in self.get_temp_managers())