Private class?
Brian van den Broek
bvande at po-box.mcgill.ca
Thu Apr 21 10:27:44 EDT 2005
codecraig said unto the world upon 2005-04-21 09:13:
> Hi,
> First, I come from a Java background.
<SNIP>
> ...so that is what I am thinking. However, i guess my issue is how to
> make EventBus a singleton or prevent it from being instaniated and
> making it's methods statically accessible.
>
> thanks.
>
I don't come from a Java, or any other language, background, so I
cannot warrant that any of these will seem helpful to you. But there
are a lot of Singleton and Singleton-like patterns floating about.
Here's some:
<http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66531>
<http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52558>
<http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/102187>
<http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286206>
<http://fraca7.free.fr/blog/index.php?2005/03/23/6-design-patterns-part-iii---singleton>
Best,
Brian vdB
More information about the Python-list
mailing list