Carl Banks wrote:
That's not what I was asking for. I was asking for a use case for "if x" that can't be replaced by a simple explicit test. Your example didn't satisfy that.
But I believe my example of an iterator with __bool__ but not with __len__ does.
-- http://mail.python.org/mailman/listinfo/python-list