-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
NetworkX has can and should run. Where can-run says whether the backend is able to run it, while "should run" indicates that the backend prefers not to run. A reason for this would be large conversion cost for example.
Spatch should_run
is currently more a can_run
, able to reject running (e.g. it may not support all parameters) beyond the default type matching.
In my opinion, the way this is handled is OK, but spatch
should allow what NetworkX does.
That is:
- Allow
should_run
to return a "if needed" style value. - When it is returned, call this backend if there is no other choice.
- There is a tricky situation if multiple backends say "if needed". In that case, I could see a future where
should_run()
is called a second time with additional information.
See also the discussion with @Schefflera-Arboricola in #3 (comment)
Metadata
Metadata
Assignees
Labels
No labels