New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extra kwargs raises exemption #4420
Comments
Why would you want to not raise an exception if something is incorrect? We already have a problem where we don't do enough input validation, so various arguments get silently lost. There are some functions that do pass-through keywords, but they really should be the exception and not the norm (it makes it difficult to know if everything has been validated). |
The expand a bit on what @WeatherGod said, we use I am strongly 👎 on this (and would like things to raise more exceptions earlier for invalid input). |
By the way, if you are looking to write error-free code: https://pypi.python.org/pypi/fuckit/4.8.0 |
ok, no problem, I agree with your arguments. I was wrapping plot functions, and I guess was being a bit lazy by just passing _args and *_kwargs. Closed. |
I have a simple suggestion that I would be happy to implement if there is agreement: Can we NOT raise exemptions when unknown kwargs are passed to a plotting function (ie plot, scatter)? My understanding is that most APIs use _args and *_kwargs in function definitions so that they won't crash if they get extra arguments.
The text was updated successfully, but these errors were encountered: