﻿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
27154	Allow comparing CallableFalse/CallableTrue with bitwise or	Tom Christie	Olexander Yermakov	"Original raised as a ticket in REST framework: https://github.com/tomchristie/django-rest-framework/issues/4439

Something that may confuse users calling `.is_authenticated`...

There's a slight difference in behavior between how the CallableFalse/CallableTrue instances behave compare to how False/True behave.

The Python boolean type happens to support the bitwise OR operator, and its behavior in this case is exactly equivalent to the `or` operator. Eg. `False | True` returns `True`

The backwards compat CallableFalse/CallableTrue instances do not support this usage, and will fail with eg. `TypeError: unsupported operand type(s) for |: 'instance' and 'bool'`

Their behavior is reasonable enough, and the user should really be using the boolean `or` operator, but we might introduce slightly less friction (ie don't raise a slightly opaque error message to the user) if we simply support and allow the bitwise operator in the same way as the boolean equivalents.

I'm probably a +0 on resolving this, as think it'd save a few folks a bit of head banging. Certainly wouldn't dispute a `wontfix` categorization.

Tip for easy pickings folks: Should be resolvable by including an `__or__` method on the CallableFalse/CallableTrue classes."	Cleanup/optimization	closed	contrib.auth	1.10	Release blocker	fixed			Ready for checkin	1	0	0	0	1	0
