On Thu, 3 Mar 2022 at 18:25, Schachner, Joseph
<[email protected]> wrote:
> I don't know what that would be. "finally" is available 😊 Write up a
> feature request.
Not sure if you mean `finally` seriously but I think that would about
as confusing as the current `else`, if not even more 😅
Meanwhile, I found another solution which is somewhat neater than
using a boolean flag:
item = sentinel = object()
for item in iterable:
do_stuff(item)
if item is sentinel:
print('No items in iterable!')
--
https://mail.python.org/mailman/listinfo/python-list