Popular recipes by Dmitry http://code.activestate.com/recipes/users/4173772/2010-05-05T17:02:42-07:00ActiveState Code RecipesSingleton(subclass) with once initialization (Python)
2010-04-23T11:27:58-07:00Dmitryhttp://code.activestate.com/recipes/users/4173772/http://code.activestate.com/recipes/577208-singletonsubclass-with-once-initialization/
<p style="color: grey">
Python
recipe 577208
by <a href="/recipes/users/4173772/">Dmitry</a>
(<a href="/recipes/tags/initialization/">initialization</a>, <a href="/recipes/tags/singleton/">singleton</a>).
</p>
<p>Yet one singleton realization on Python without metaclass. Singleton may has __init__ method which will call only when first object create.</p>
Immutable object(subclass) (Python)
2010-04-23T08:30:50-07:00Dmitryhttp://code.activestate.com/recipes/users/4173772/http://code.activestate.com/recipes/577207-immutable-objectsubclass/
<p style="color: grey">
Python
recipe 577207
by <a href="/recipes/users/4173772/">Dmitry</a>
(<a href="/recipes/tags/immutable/">immutable</a>, <a href="/recipes/tags/object/">object</a>).
Revision 2.
</p>
<p>Useful class and decorator for create immutable objects. Decorator mutablemethod used for define mutable methods.</p>
Object Wrapper (Python)
2010-05-05T17:02:42-07:00Dmitryhttp://code.activestate.com/recipes/users/4173772/http://code.activestate.com/recipes/577215-object-wrapper/
<p style="color: grey">
Python
recipe 577215
by <a href="/recipes/users/4173772/">Dmitry</a>
(<a href="/recipes/tags/decorator/">decorator</a>, <a href="/recipes/tags/object/">object</a>, <a href="/recipes/tags/wrapper/">wrapper</a>).
</p>
<p>There is classical wrapper on Python language. If you have only object and can't change object generation you can use this class.</p>