[sf-lug] [PYCLASS] Digression: doctests

Asheesh Laroia asheesh at asheesh.org
Mon Nov 10 19:58:49 PST 2008

Today we discussed:

* Importing your code as a module
* Docstrings, like:

def yourmom():
 	'''Your mom has a docstring.'''

* Doctests, like in the attachment.
* repr() vs. str()
* eval(), repr(), and print

Then Alex Kleider wrote his own Python interpreter in two lines of code!


Then we talked about slide projectors, Betamax, and transparent aluminum.

-- Asheesh.

Pray:  To ask that the laws of the universe be annulled in behalf of a single
petitioner confessedly unworthy.
 		-- Ambrose Bierce
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doctest_demo.py
Type: text/x-python
Size: 446 bytes
URL: <http://linuxmafia.com/pipermail/sf-lug/attachments/20081110/0ec82998/attachment.py>

More information about the sf-lug mailing list