Message325056
>
> I've discussed this with other core devs and spent a good deal of time evaluating this proposal. I'm going to pass on the this one but do think it was a inspired suggestion. Thank you for the proposal.
Thank you for taking the time to consider it. I understand that there
are many proposals.
>
> ----------
>
> Note, the original get_where() recipe has an issue. Upon successful lookup, it returns a 2-tuple but on failure it calls __missing__ which typically returns a scalar (if it doesn't raise an exception).
FWIW this was intended to work when `__missing__` was subclassed to
raise a more specific exception. The case where it is made to return a
value clearly doesn't play well with the proposed method, and would
likely need to be subclassed as well. I consider this an acceptable
trade off because I find this use case rather esoteric: the same
functionality could be achieved in an arguably clearer way by passing
a mapping with the desired missing semantics as the outermost scope. |
|
Date |
User |
Action |
Args |
2018-09-11 20:21:27 | Zahari.Dim | set | recipients:
+ Zahari.Dim, rhettinger, serhiy.storchaka |
2018-09-11 20:21:27 | Zahari.Dim | link | issue34586 messages |
2018-09-11 20:21:27 | Zahari.Dim | create | |
|