You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first argument for the callbacks is the retriever: Retriever.
From testing and looking at the examples, I can see that it's not used a lot at all.
I've found myself changing the function signatures (from examples) from the first line below to the second.
# From example:defset_timestamp_repeat(retriever: Retriever, instance: FileHeader):
...
# To this (look at retriever parameter)defset_timestamp_repeat(_, instance: FileHeader):
...
Adding them the other way around allows me to leave out the second argument (which would then be Retriever).
Thoughts?
The text was updated successfully, but these errors were encountered:
This part of the API can definitely do with some improvement because when it was initially made, its usage was not clear - hence the retriever argument has kind of just stuck around. It probably is a good idea to flip the arg order (note: your signature will still need to have the _ as the second arg. The retriever arg does have use cases though, so removing it is not an option)
I was under the impression that, like JS, you can leave out trailing arguments... That's unfortunate. I've checked out some SO posts and things like *_ would be the way to go for this it seems.
So moving them around to reflect the frequency of use would be nice but isn't as useful as I had hoped. Either way, would still like to see the change! 🙂
The first argument for the callbacks is the
retriever: Retriever
.From testing and looking at the examples, I can see that it's not used a lot at all.
I've found myself changing the function signatures (from examples) from the first line below to the second.
Adding them the other way around allows me to leave out the second argument (which would then be
Retriever
).Thoughts?
The text was updated successfully, but these errors were encountered: