Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Support Singleton #11

Closed
suned opened this issue Jan 23, 2018 · 0 comments
Closed

Support Singleton #11

suned opened this issue Jan 23, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@suned
Copy link
Owner

suned commented Jan 23, 2018

from serum import *

class S(Singleton):
    pass

class Depenedent:
    s = inject(S)

with Environment():
    s1 = Dependent().s
    s2 = Dependent().s
    assert s1 is is2
@suned suned added the enhancement New feature or request label Jan 23, 2018
@suned suned closed this as completed Jan 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant