> While I’m fine with the API you propose, you could consider keyword-only
arguments to help future proof the call signature.  I don’t like it as much
because it’s not as backward compatibility proof, but it’s an option to
perhaps consider.

Let's say that we have: hook(*, exc_type, exc_value, exc_tb, obj). Now we
pass a new err_msg keyword argument: the call fails with a TypeError :-(

Or do you mean using **kwargs? I don't think **kwargs is a good API :-(
Well, the same can be done using *args and positional arguments to ignore
new unknown arguments, but I also dislike such API.

Victor

-- 
Night gathers, and now my watch begins. It shall not end until my death.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to