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

The Singleton design pattern creates only one object of the class

@gyermolenko
Copy link
Contributor

please review #279

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants