Most viewed recipes tagged "dummy"http://code.activestate.com/recipes/tags/dummy/views/2008-11-11T15:24:20-08:00ActiveState Code RecipesDummy object (Python)
2008-09-06T03:43:13-07:00nosklohttp://code.activestate.com/recipes/users/4166478/http://code.activestate.com/recipes/576447-dummy-object/
<p style="color: grey">
Python
recipe 576447
by <a href="/recipes/users/4166478/">nosklo</a>
(<a href="/recipes/tags/debug/">debug</a>, <a href="/recipes/tags/dummy/">dummy</a>, <a href="/recipes/tags/generic/">generic</a>, <a href="/recipes/tags/stupid/">stupid</a>, <a href="/recipes/tags/useless/">useless</a>).
Revision 7.
</p>
<p>Have you wished for a completely Dummy object, one that you can do whatever you want to it? One you can return and all expressions will work? </p>
<p>No???</p>
<p>Hmm.. ok. But here it is anyway.</p>
Yet another Null object (Python)
2008-11-11T15:24:20-08:00George Sakkishttp://code.activestate.com/recipes/users/2591466/http://code.activestate.com/recipes/576562-yet-another-null-object/
<p style="color: grey">
Python
recipe 576562
by <a href="/recipes/users/2591466/">George Sakkis</a>
(<a href="/recipes/tags/design_pattern/">design_pattern</a>, <a href="/recipes/tags/dummy/">dummy</a>, <a href="/recipes/tags/null/">null</a>).
</p>
<p>This recipe builds on two previously posted recipes for a <a href="http://code.activestate.com/recipes/68205/">null</a> or <a href="http://code.activestate.com/recipes/576447/">dummy</a> object by modifying a few methods (e.g. as in SQL, <code>Null == Null</code> is Null, not True), supporting most (all?) special methods (e.g. int(Null)) and providing correct pickling/unpickling.</p>