[Python-Dev] PEP 572 and assert
On Jul 17, 2018, at 11:34, Tim Peters <tim.peters at 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. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: Message signed with OpenPGP