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