Example::
>>> import colorsys
- >>> colorsys.rgb_to_hsv(.3, .4, .2)
- (0.25, 0.5, 0.4)
- >>> colorsys.hsv_to_rgb(0.25, 0.5, 0.4)
- (0.3, 0.4, 0.2)
+ >>> colorsys.rgb_to_hsv(0.2, 0.4, 0.4)
+ (0.5, 0.5, 0.4)
+ >>> colorsys.hsv_to_rgb(0.5, 0.5, 0.4)
+ (0.2, 0.4, 0.4)
Example::
>>> import filecmp
- >>> filecmp.cmp('undoc.rst', 'undoc.rst')
+ >>> filecmp.cmp('undoc.rst', 'undoc.rst') # doctest: +SKIP
True
- >>> filecmp.cmp('undoc.rst', 'index.rst')
+ >>> filecmp.cmp('undoc.rst', 'index.rst') # doctest: +SKIP
False
... for sub_dcmp in dcmp.subdirs.values():
... print_diff_files(sub_dcmp)
...
- >>> dcmp = dircmp('dir1', 'dir2')
- >>> print_diff_files(dcmp)
+ >>> dcmp = dircmp('dir1', 'dir2') # doctest: +SKIP
+ >>> print_diff_files(dcmp) # doctest: +SKIP
.. function:: fsum(iterable)
+.. testsetup::
+ >>> from math import fsum
Return an accurate floating point sum of values in the iterable. Avoids
loss of precision by tracking multiple intermediate partial sums::
>>> Template('Give $who $100').substitute(d)
Traceback (most recent call last):
[...]
- ValueError: Invalid placeholder in string: line 1, col 10
+ ValueError: Invalid placeholder in string: line 1, col 11
>>> Template('$who likes $what').substitute(d)
Traceback (most recent call last):
[...]
Ionel Simionescu
Kirill Simonov
Nathan Paul Simons
+Ravi Sinha
Janne Sinkkonen
Ng Pheng Siong
George Sipe