<br><div>In calling something &quot;demented&quot; I&#39;m coming off</div><div>the namespace used around genres of cartoon.</div><div><br></div><div>Cartoons I&#39;d consider demented:</div><div><br></div><div>Pinky and the Brain</div>
<div>Ren and Stimpy</div><div>Teenage Aqua Hunger Force (Kevin Altis of PythonCard a fan)</div><div>SpongeBob SquarePants</div><div>...</div><div><br></div><div><br></div><div>(see clips on Youtube for any/all)</div><div>
<br></div><div>Synonyms for demented:  zany, surreal</div><div><br></div><div>Relevant:  links to &quot;grossology&quot; in EuroPython </div><div>presentation:</div><div><br></div><div><a href="http://www.4dsolutions.net/presentations/connectingthedots.pdf">http://www.4dsolutions.net/presentations/connectingthedots.pdf</a></div>
<div>(see string.Template Mad Libs)</div><div><br></div><div>Likewise, Demented Python serves a didactic function,</div><div>here to remind about the decorator:</div><div><div><br></div><div>def sillystrip( f ):</div><div>
    if f.__doc__:</div><div>        f.__doc__ = &quot;Your function has been hacked!&quot;</div><div>    else:</div><div>        f.__doc__ = &quot;You should always have a docstring.&quot;</div><div>    return f</div><div>
<br></div><div>@sillystrip</div><div>def square( x ):</div><div>    &quot;&quot;&quot;could also be a triangle&quot;&quot;&quot;</div><div>    return x * x</div><div><br></div><div>def _test():</div><div>    frank = 2</div>
<div>    joe = square (frank)  # frank is kinda square</div><div>    print(&quot;Hello Joe, Frank here.&quot;)</div><div>    print(square.__doc__)</div><div>        </div><div>if __name__ == &quot;__main__&quot;:</div><div>
    _test()</div><div>    </div></div><div>Usage:</div><div><br></div><div><div>&gt;&gt;&gt; ================================ RESTART ================================</div><div>&gt;&gt;&gt; </div><div>Hello Joe, Frank here.</div>
<div>Your function has been hacked!</div><div><br></div><div>Then comment out the docstring in the def of square.</div><div><br></div><div>&gt;&gt;&gt; ================================ RESTART ================================</div>
<div>&gt;&gt;&gt; </div><div>Hello Joe, Frank here.</div><div>You should always have a docstring.</div></div><div><br></div>