id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 6991,"Omit redundant ""if"" judgements",Liang Feng ,Alexander Koshelev,"{{{ django/contrib/admin/views/decorators.py: if request.user.is_authenticated() and request.user.is_staff: }}} ### COMMENT: {{{request.user.is_staff is True}}} implied that {{{request.user.is_authenticated()}}} is True, so {{{request.user.is_authenticated()}}} could be omitted. {{{ docs/authentication.txt: if not (request.user.is_authenticated() and request.user.has_perm('polls.can_vote')): }}} ### COMMENT: {{{request.user.has_perm('polls.can_vote') is True}}} implied that {{{request.user.is_authenticated()}}} is True, so {{{request.user.is_authenticated()}}} could be omitted. p.s. may save some precious cpu cycles on Google App Engine. :P ",,closed,contrib.admin,newforms-admin,,fixed,nfa-someday yandex-sprint ep2008,,Ready for checkin,1,0,0,0,0,0