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

added singleton pattern. #303

Closed
wants to merge 2 commits into from
Closed

added singleton pattern. #303

wants to merge 2 commits into from

Conversation

@hoseinfzad
Copy link

@hoseinfzad hoseinfzad commented Oct 6, 2019

The Singleton design pattern creates only one object of the class

@gyermolenko
Copy link
Contributor

@gyermolenko gyermolenko commented Oct 7, 2019

please review #279

def __setattr__(self, name):
return setattr(self.instance, name)
Comment on lines 21 to 22

This comment has been minimized.

@adihat

adihat Oct 7, 2019

Changes:

def __setattr__(self, name, value):
    return setattr(self.instance, name, value)

Reason: The signature of SingletonObject.__setattr__ doesn't match the signature of base method in class object

@adihat
Copy link

@adihat adihat commented Oct 7, 2019

@hoseinfzad Please see #256
As @faif mentioned, there is no plan to add singleton pattern to this repo as its considered an anti pattern. There is a plan to maintain a list of these anti patterns in the readme file instead of having to go through all the issues.

@faif faif closed this Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.