python - Provide Global Access Point to an Instance of an Object -


Imagine a system (Python), where different parts interact constantly with an example of a given object . What is the best way to provide universal access points for this example?

So far I only have __init __. Py and Import Module Requirement:

  # __init__.py Class Thing (Object, Singleton): The Typing = Thing () __all__ = [ 'The Typing']  

What is the TheThing ?

j is a better way to provide a universal access point for

Do not use singletons in Python Python module are great single songs ( They only get started once and are available everywhere) and if you need it, you can be one in a global variable.

The explanation given here is:


Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -