A singleton package that can prevent reference cycle
Project description
my_singleton Package
This is a simple singleton. Borg pattern can achieve this aim by share state, however it can't solve this problem in which 2 objects refer circularly.
e.g.
obj = object
Class A(obj):
def __init__(self):
self.b_obj = B()
Class B(obj):
def __init__(self):
self.a_obj = A()
when we define c = A(),
there must be a err.
but,
if obj = my_singleton,
from nocycle_singleton.singleton import Singleton as my_singleton,
we can solve this.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nocycle_singleton-0.0.3.tar.gz.
File metadata
- Download URL: nocycle_singleton-0.0.3.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcd36c551104cf1a75801624fe0ce0c2a689625bcc93c1431fc11db5077c3e83
|
|
| MD5 |
f889f71b3712e9785b37fd4855ea2682
|
|
| BLAKE2b-256 |
812322e436587bc27e7cc644ab3e8c230eba6fe0f94d7d9c92a6026802729f7e
|
File details
Details for the file nocycle_singleton-0.0.3-py2-none-any.whl.
File metadata
- Download URL: nocycle_singleton-0.0.3-py2-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97d86f142fb348c119721587b8e17b2c1cdb0e8716f3948100ad1a2d69bf6169
|
|
| MD5 |
5b9534340aaa83644788a90355710f69
|
|
| BLAKE2b-256 |
bdc0ee1c9a35130f3cb9c8dcebbe9e79ba327aa6c505054882ccbce725e14574
|