As it stands, ifilter can raise an exception and the user won't know what happened. It would at least be useful to know about the exception if the yielded sequence is empty (i.e. the filter never matched), it may well have been a programming error.