On Sat, Apr 2, 2011 at 14:16, kirby urner <kirby.urner@gmail.com> wrote:
In calling something "demented" I'm coming off the namespace used around genres of cartoon. Cartoons I'd consider demented: Pinky and the Brain
and their hosts, the Animaniacs
Ren and Stimpy Teenage Aqua Hunger Force (Kevin Altis of PythonCard a fan)
Aqua Teen Hunger Force (Number 1 in the hood, man)
SpongeBob SquarePants ...
Spaceghost Coast-to-Coast Sealab 2021 Harvey Birdman, Attorney at Law Invader Zim South Park The Simpsons Futurama Family Guy Huri-kuri Suupaa Miruku Chan (Super Milk Chan) Bobobo-bo-bobobo Urusai Yatsura and, as you say, ..., in a tradition going back to Aristophanes, and to distant prehistory. Saw a flea Kick a tree, Fubba-wubba Fubba-wubba. Saw a flea kick a tree, Fubba-wubba John. Saw a flea Kick a tree In the middle of the sea, Singin' Old Blind Drunk John, Fubba-wubba John.
(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.
Defensive programming: <Pseudocode> Case: True:... Case: False:... Else: Print("This can't happen.") </>
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
-- Edward Mokurai (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) Cherlin Silent Thunder is my name, and Children are my nation. The Cosmos is my dwelling place, the Truth my destination. http://www.earthtreasury.org/