You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect this statement to raise an exception, because first([]) normally raises an exception on an empty sequence. However, the exception is StopIteration which seems to interfere with map and stops its iteration.
What do you think about catching StopIteration in first() and re-raising a different exception, so it can propagate until explicitly caught? Which exception would be appropriate?