Re:WTFPython: Exploring and understanding Python through sur...
by dragonwriter on Tuesday May 31, 2022 @02:00PM
(#31572718)
Honestly, for this specific case, I prefer one_or_none() to return an iterable with zero or one items, and then just doing:
If you don't control one_or_none, but it returns an Optional, you can wrap it with something like:
[ Parent
| on HN ]
There are no comments on this comment yet.