Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nocycle_singleton-0.0.3.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nocycle_singleton-0.0.3-py2-none-any.whl (2.6 kB view details)

Uploaded Python 2

File details

Details for the file nocycle_singleton-0.0.3.tar.gz.

File metadata

File hashes

Hashes for nocycle_singleton-0.0.3.tar.gz
Algorithm Hash digest
SHA256 bcd36c551104cf1a75801624fe0ce0c2a689625bcc93c1431fc11db5077c3e83
MD5 f889f71b3712e9785b37fd4855ea2682
BLAKE2b-256 812322e436587bc27e7cc644ab3e8c230eba6fe0f94d7d9c92a6026802729f7e

See more details on using hashes here.

File details

Details for the file nocycle_singleton-0.0.3-py2-none-any.whl.

File metadata

File hashes

Hashes for nocycle_singleton-0.0.3-py2-none-any.whl
Algorithm Hash digest
SHA256 97d86f142fb348c119721587b8e17b2c1cdb0e8716f3948100ad1a2d69bf6169
MD5 5b9534340aaa83644788a90355710f69
BLAKE2b-256 bdc0ee1c9a35130f3cb9c8dcebbe9e79ba327aa6c505054882ccbce725e14574

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page