On Jul 17, 2018, at 11:34, Tim Peters <tim.pet...@gmail.com> wrote: > Assuming the result of list(path.iterdir()) can change over time (seems very > likely), > > assert len(list(path.iterdir())) == 0, list(path.iterdir()) > > _could_ end up both triggering and displaying an empty list in the exception > detail. The assignment-expression version cannot.
Tim, you’re dangerously tempting me into +1 territory. :) -Barry
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com