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.

Use more explicit keywords

See original GitHub issue

Our top-level dask.compute, dask.persist, and dask.visualize methods all have **kwargs in their signature. Certain keyword arguments are then poped off the kwargs dict

https://github.com/dask/dask/blob/89d93a8264ce81c30207d83de96e3346a15365a4/dask/base.py#L551-L552

and the remaining kwargs are then forwarded elsewhere

https://github.com/dask/dask/blob/89d93a8264ce81c30207d83de96e3346a15365a4/dask/base.py#L564

It would be nice if the keywords which were poped off kwargs were instead explicitly marked in the method signature. For example, if computes signature was changed from

def compute(*args, **kwargs):

to

def compute(*args, traverse=True, scheduler=None, optimize_graph=True, **kwargs):

This would be it easier to see what keyword arguments are supported by quickly inspecting these method’s signature and would probably lead to better type checking integration. This is relatively low priority, but would be a nice quality of life improvement that, I think, should be relatively straightforward to implement.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ian-r-rosecommented, Dec 15, 2021

Closing as fixed by #8354, thanks @boazmohar !

0reactions
jsignellcommented, Nov 9, 2021

Yeah I think token and parent_meta are really meant for internal use and aren’t considered to be user-facing so it’s fine to leave them as is.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use of explicit keyword in C++ - GeeksforGeeks
Explicit Keyword in C++ is used to mark constructors to not implicitly convert types in C++. It is optional for constructors that take ......
Read more >
What does the explicit keyword mean in C++? - Stack Overflow
What this means is that the compiler can use constructors callable with a single parameter to convert from one type to another in...
Read more >
Explicit or Implicit Keywords - The Spectrum Group Online
Explicit and Implicit local keywords become important when you're looking at why the user is searching for them. The searcher's intent should ...
Read more >
What is the explicit keyword in C++? - Educative.io
Prefixing the explicit keyword to the constructor prevents the compiler from using that constructor for implicit conversions. It will now ​create a compiler ......
Read more >
Use of explicit keyword in C++, you should know - Aticleworld
Blog post explains importance and use of the “explicit keyword in C++”. You will learn here when and how to use the explicit...
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