[Python-ideas] Add __nonzero__ to threading.Event
Antoine Pitrou
solipsis at pitrou.net
Mon May 11 02:11:33 CEST 2009
Floris Bruynooghe <floris.bruynooghe at ...> writes:
>
> Is it worth submitting this to the tracker or is there some reason why
> this is a bad idea that I've missed?
First, __nonzero__ should only be used when the notion of a truth value is
obvious. I'm not sure it is the case here, although I don't find it shocking.
Second, adding it would break compatibility for code using "if not event" as a
shorthand for "if event is None".
In any case, as Aahz said, please file a bug in the tracker.
Regards
Antoine.
More information about the Python-ideas
mailing list