python-patterns
python-patterns copied to clipboard
A collection of design patterns/idioms in Python
This PR adds a simple implementation of the Singleton design pattern in Python. The example is placed in patterns/singleton.py and includes comments and a small test run.
There are multiple references to Python versions that are officially EOL. And there is no support for newer versions yet.
According to official Python documentation, setuptools is replaced in favor of pyproject.toml to define and package a Python project. In case of this project, transitioning from setuptools to pyproject.toml: No...
### Summary Fixed minor documentation formatting issues and improved code safety. ### Details - Cleaned up unnecessary asterisks in `builder.py` docstrings for better readability. - Added default return value in...
In patterns/behavioural/catalog.py , the top multiline comment says: "A class that uses different static function depending of a parameter.." Typo details: - "depending of" -> should be "depending on" -...