This repository has been archived by the owner on Aug 10, 2024. It is now read-only.
V2: world[instanceOf[SomeProtocol]()] and .by_default #71
pauleveritt
started this conversation in
General
Replies: 1 comment
-
With from antidote import QualifiedBy, world, instanceOf
def not_qualified(predicate: QualifiedBy | None) -> bool:
return predicate is None
greeter = world[instanceOf[Greeter]().single(not_qualified)] Maybe it should be there by default, not sure. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
(Sorry, going to be a lot of questions..I have a long way to go to be ready by Monday. 🙁)
In the code below, a question marked with
Q:
...not sure why the.by_default
registration wasn't chosen. I can fix it with withsingle
.Beta Was this translation helpful? Give feedback.
All reactions