When we iterate over select without consuming a previously selected value, select raises a SelectError that derives from BaseException.
The use of BaseException combined with tasks consuming exceptions makes it hard to identify that anything happened, because a broad except Exception: block doesn't catch BaseExceptions.
What happened?
When we iterate over
select
without consuming a previously selected value, select raises aSelectError
that derives fromBaseException
.The use of
BaseException
combined with tasks consuming exceptions makes it hard to identify that anything happened, because a broadexcept Exception:
block doesn't catchBaseException
s.The use of
BaseException
in user code is not recommended according to python docs: https://docs.python.org/3/library/exceptions.html#BaseExceptionWhat did you expect instead?
A
except Exception:
catchesselect
errors. i.e.SelectError
s derive fromException
and notBaseException
.Affected part(s)
Synchronization of multiple sources (
select()
,merge()
, etc.) (part:synchronization)