update
This commit is contained in:
12
python design pattern singleton.md
Normal file
12
python design pattern singleton.md
Normal file
@@ -0,0 +1,12 @@
|
||||
up:: [[design pattern singleton]], [[python design patterns]]
|
||||
#informatique/langage/python
|
||||
|
||||
# implémentations possibles
|
||||
|
||||
## avec un décorateur
|
||||
|
||||
```python
|
||||
def singleton():
|
||||
_instances = {} # ensembles des instances
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user