Staging
v0.5.1
https://github.com/python/cpython
Revision 58b6f5b53e67878fa3d9bbe4f4112cddf1ebb5cc authored by Guido van Rossum on 06 April 2001, 19:39:11 UTC, committed by Guido van Rossum on 06 April 2001, 19:39:11 UTC
add a self-test using doctest.  Results:

- The docstring needs to be a raw string because it uses \"...\".

- The oreo example was broken: the Set-Cookie output doesn't add
  quotes around "doublestuff".

- I had to change the example that prints the class of a Cookie.Cookie
  instance to avoid incorporating an arbitrary object address in the
  test output.

Pretty good score for both doctest and the doc string, I'd say!
1 parent f95423e
History
Tip revision: 58b6f5b53e67878fa3d9bbe4f4112cddf1ebb5cc authored by Guido van Rossum on 06 April 2001, 19:39:11 UTC
Since this module already uses doctest-style examples, I figured I'd
Tip revision: 58b6f5b
File Mode Size
.cvsignore -rw-r--r-- 17 bytes
abstract.c -rw-r--r-- 34.2 KB
bufferobject.c -rw-r--r-- 11.1 KB
cellobject.c -rw-r--r-- 2.3 KB
classobject.c -rw-r--r-- 47.8 KB
cobject.c -rw-r--r-- 3.6 KB
complexobject.c -rw-r--r-- 13.9 KB
dictobject.c -rw-r--r-- 31.0 KB
fileobject.c -rw-r--r-- 33.8 KB
floatobject.c -rw-r--r-- 17.9 KB
frameobject.c -rw-r--r-- 10.0 KB
funcobject.c -rw-r--r-- 8.1 KB
intobject.c -rw-r--r-- 19.2 KB
listobject.c -rw-r--r-- 40.5 KB
longobject.c -rw-r--r-- 38.8 KB
methodobject.c -rw-r--r-- 5.0 KB
moduleobject.c -rw-r--r-- 5.7 KB
object.c -rw-r--r-- 36.0 KB
obmalloc.c -rw-r--r-- 22.2 KB
rangeobject.c -rw-r--r-- 6.5 KB
sliceobject.c -rw-r--r-- 4.1 KB
stringobject.c -rw-r--r-- 74.9 KB
tupleobject.c -rw-r--r-- 12.3 KB
typeobject.c -rw-r--r-- 1.3 KB
unicodectype.c -rw-r--r-- 8.5 KB
unicodeobject.c -rw-r--r-- 122.4 KB
unicodetype_db.h -rw-r--r-- 37.0 KB
xxobject.c -rw-r--r-- 2.4 KB

back to top