question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Raise exception if the user passes in unused keywords to Client

See original GitHub issue

For 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:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mrocklincommented, Oct 2, 2019

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.

0reactions
mrocklincommented, Oct 4, 2019

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:

Yeah, simpler is better. I didn’t know if that would be too broad and raise for other extra keywords that are not in LocalCluster.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dask/distributed/issues/3014?email_source=notifications&email_token=AACKZTGZ563LINOTTWW47X3QM5CPHA5CNFSM4ISD3XK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEALWKUQ#issuecomment-538404178, or mute the thread https://github.com/notifications/unsubscribe-auth/AACKZTCW7VDRCMUXNJPQH2LQM5CPHANCNFSM4ISD3XKQ .

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found