3 ms·
> I needed to know if a user was omitting an optional argument or passing an explicit None into it. Sounds like kindof like an Optional<Optional<Value>>. An op
by im3w1l 6y ago
> I needed to know if a user was omitting an optional argument or passing an explicit None into it.
Sounds like kindof like an Optional<Optional<Value>>. An optional is just a container of at most one element, so you could emulate that with a singleton list, having None mean not specified, [value] be value, and [None] be explicit lack of value.