[Python-ideas] Syntax for allowing extra keys when unpacking a dict as keyword arguments
Viktor Roytman
viktor.roytman at gmail.com
Fri Apr 12 17:03:43 EDT 2019
>
> That seems to me to be quite different issue. Just throwing invalid stuff
> on the ground in this scenario will avoid a crash but lose data. This seems
> much worse to me than the crash.
>
Throwing it away does seem extreme. Maybe something that indicates what's
left over? In other words:
result, leftover_kwargs = func(<some syntax for this>kwargs)
or
result = func(<some syntax for this>kwargs)
assert kwargs == {'whatever is': 'left over'}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20190412/6bbcb262/attachment-0001.html>
More information about the Python-ideas
mailing list