Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does mimic Guice annotation bindings for the same class? #21

Closed
basilmusa opened this issue Nov 4, 2021 · 2 comments
Closed

What does mimic Guice annotation bindings for the same class? #21

basilmusa opened this issue Nov 4, 2021 · 2 comments

Comments

@basilmusa
Copy link

Interested to know what does mimic Guice annotation bindings for the same class/interface.

For example I have an interface called MessageSendingService.

I want to bind MessageSendingService to the implementation TwitterService when annotated with @TwitterService
I want to bind MessageSendingService to the implementation EmailService when annotated with @emailservice

I know annotations don't exist in python, so what would be the alternative here and in Opyoid?

@Aegdesil
Copy link
Contributor

Aegdesil commented Nov 4, 2021

The equivalent in Opyoid is named arguments, you can read more about its usage here: https://github.com/illuin-tech/opyoid/blob/master/docs/names.md

@basilmusa
Copy link
Author

The equivalent in Opyoid is named arguments, you can read more about its usage here: https://github.com/illuin-tech/opyoid/blob/master/docs/names.md

Great. Thanks @Aegdesil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants