MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / get_database

Function get_database

example_code/item_112.py:132–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130DATABASE = None
131
132def get_database():
133 global DATABASE
134 if DATABASE is None:
135 DATABASE = ZooDatabase()
136 return DATABASE
137
138def main(argv):
139 database = get_database()

Callers 1

mainFunction · 0.85

Calls 1

ZooDatabaseClass · 0.85

Tested by

no test coverage detected