def get_author_name(user, email=True):
 full_name = user.first_name
 if (full_name == u''):
  full_name = user.username
 if (not email):
  return full_name
 return (u'%s <%s>' % (full_name, user.email))

def get_author_name ( user , email = True ) : full_name = user . first_name if ( full_name == u'' ) : full_name = user . username if ( not email ) : return full_name return ( u'%s <%s>' % ( full_name , user . email ) )
returns formatted author name with email .