28
You could just use
if user_can_read(request.user, b):
## do stuff
If user_can_read returns anything (except 0, False, etc), it will be considered True, and do stuff.
And the negation: if not user_can_read(request.user, b)