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 parts of Trio that I have seen use a *args approach for forwarded arguments and leave it to the caller to use functools.partial() if they want keyword arguments. So far I've been trying to stick with that but it has the limitation regarding keyword args and also can make typing hinting a bit weird. If instead positional arguments are taken in a sequence and keyword arguments in a map then they are two well defined parameters that can be passed positionally or by keyword and type hinted well.
The parts of Trio that I have seen use a
*args
approach for forwarded arguments and leave it to the caller to usefunctools.partial()
if they want keyword arguments. So far I've been trying to stick with that but it has the limitation regarding keyword args and also can make typing hinting a bit weird. If instead positional arguments are taken in a sequence and keyword arguments in a map then they are two well defined parameters that can be passed positionally or by keyword and type hinted well.So, how far should I stick to being Trio-like?
Came up while looking at this and trying to hint it.
https://github.com/altendky/qtrio/pull/90/files#diff-aca67cae4ab3db4c745d891483802bf2R230-R235.
The text was updated successfully, but these errors were encountered: