Raise exception if the user passes in unused keywords to Client
See original GitHub issueFor example
client = Client(address, dashboard_address="foo")
The dashboard address keyword is useful if we’re creating a LocalCluster
, but it doesn’t get used if we’re connecting to an already-started scheduler. In these cases, we should probably raise, otherwise we risk adding confusion.
cc @shwina
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to use the Throws keyword in Java (and when ... - Rollbar
The throw keyword is useful for throwing exceptions based on certain conditions e.g. if a user enters incorrect data. It is also useful...
Read more >Why catch and rethrow an exception in C#? - Stack Overflow
First, the way that the code in the article does it is evil. throw ex will reset the call stack in the exception...
Read more >Exception Handling in Python - TutorialsTeacher
Learn how to handle exceptions in Python using try and except keywords.
Read more >Effective Python: 4 Best Practices for Function Arguments
Keyword arguments with default values make it easy to add new behaviors to a function, especially when the function has existing callers.
Read more >Python raise Keyword - W3Schools
The raise keyword is used to raise an exception. You can define what kind of error to raise, and the text to print...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Most of the time we tend to use built-in exceptions, but with informative messages. We should probably either change this policy everywhere (and make dozens of new exception types) or keep it. I’m in favor of keeping it.
The code you provide would solve the specific issue around dashboard_address, but we would prefer a solution that covers any excess keyword. dashboard_address was just used above as an example.
I don’t think that we use them anywhere else, but hopefully if we do then tests will start failing if this is wrong.
On Fri, Oct 4, 2019 at 8:47 AM Jonathan De Troye notifications@github.com wrote: