Message397253
I agree Raymond's `before_and_after()` looks like an elegant, efficient, and usable approach to this.
One minor nit: there's no need for the `iter()` call in:
yield from iter(transition)
Indeed, it confused me at first, because `yield from x` does its own `iter(x)` call under the covers, and since everyone knows that ;-) , I wondered what deep trickery calling it again was intended to pull off.
But I persuaded myself there was no such subtle intent - it's just redundant. |
|
Date |
User |
Action |
Args |
2021-07-11 01:17:33 | tim.peters | set | recipients:
+ tim.peters, rhettinger, serhiy.storchaka, pavel-lexyr |
2021-07-11 01:17:33 | tim.peters | set | messageid: <1625966253.04.0.588458504263.issue44571@roundup.psfhosted.org> |
2021-07-11 01:17:33 | tim.peters | link | issue44571 messages |
2021-07-11 01:17:32 | tim.peters | create | |
|