<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Mu - 076continuation.cc</title>
<meta name="Generator" content="Vim/8.0">
<meta name="plugin-version" content="vim7.4_v2">
<meta name="syntax" content="cpp">
<meta name="settings" content="number_lines,use_css,pre_wrap,no_foldcolumn,expand_tabs,line_ids,prevent_copy=">
<meta name="colorscheme" content="minimal-light">
<style type="text/css">
<!--
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #c6c6c6; }
body { font-size:12pt; font-family: monospace; color: #000000; background-color: #c6c6c6; }
a { color:inherit; }
* { font-size:12pt; font-size: 1em; }
.traceAbsent { color: #c00000; }
.LineNr { }
.Constant { color: #008787; }
.muRecipe { color: #ff8700; }
.Delimiter { color: #c000c0; }
.Special { color: #d70000; }
.Identifier { color: #af5f00; }
.Normal { color: #000000; background-color: #c6c6c6; padding-bottom: 1px; }
.Comment { color: #005faf; }
.cSpecial { color: #008000; }
.traceContains { color: #005f00; }
-->
</style>

<script type='text/javascript'>
<!--

/* function to open any folds containing a jumped-to line before jumping to it */
function JumpToLine()
{
  var lineNum;
  lineNum = window.location.hash;
  lineNum = lineNum.substr(1); /* strip off '#' */

  if (lineNum.indexOf('L') == -1) {
    lineNum = 'L'+lineNum;
  }
  lineElem = document.getElementById(lineNum);
  /* Always jump to new location even if the line was hidden inside a fold, or
   * we corrected the raw number to a line ID.
   */
  if (lineElem) {
    lineElem.scrollIntoView(true);
  }
  return true;
}
if ('onhashchange' in window) {
  window.onhashchange = JumpToLine;
}

-->
</script>
</head>
<body onload='JumpToLine();'>
<a href='https://github.com/akkartik/mu/blob/master/076continuation.cc'>https://github.com/akkartik/mu/blob/master/076continuation.cc</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr">  1 </span><span class="Comment">//: Continuations are a powerful primitive for constructing advanced kinds of</span>
<span id="L2" class="LineNr">  2 </span><span class="Comment">//: control *policies* like back-tracking.</span>
<span id="L3" class="LineNr">  3 </span><span class="Comment">//:</span>
<span id="L4" class="LineNr">  4 </span><span class="Comment">//: In Mu, continuations are first-class and delimited, and are constructed</span>
<span id="L5" class="LineNr">  5 </span><span class="Comment">//: out of two primitives:</span>
<span id="L6" class="LineNr">  6 </span><span class="Comment">//:</span>
<span id="L7" class="LineNr">  7 </span><span class="Comment">//:  * 'call-with-continuation-mark' marks the top of the call stack and then</span>
<span id="L8" class="LineNr">  8 </span><span class="Comment">//:    calls the provided recipe.</span>
<span id="L9" class="LineNr">  9 </span><span class="Comment">//:  * 'return-continuation-until-mark' copies the top of the stack</span>
<span id="L10" class="LineNr"> 10 </span><span class="Comment">//:    until the mark, and returns it as the result of</span>
<span id="L11" class="LineNr"> 11 </span><span class="Comment">//:    'call-with-continuation-mark' (which might be a distant ancestor on the</span>
<span id="L12" class="LineNr"> 12 </span><span class="Comment">//:    call stack; intervening calls don't return)</span>
<span id="L13" class="LineNr"> 13 </span><span class="Comment">//:</span>
<span id="L14" class="LineNr"> 14 </span><span class="Comment">//: The resulting slice of the stack can now be called just like a regular</span>
<span id="L15" class="LineNr"> 15 </span><span class="Comment">//: recipe.</span>
<span id="L16" class="LineNr"> 16 </span><span class="Comment">//:</span>
<span id="L17" class="LineNr"> 17 </span><span class="Comment">//: See the example programs continuation*.mu to get a sense for the</span>
<span id="L18" class="LineNr"> 18 </span><span class="Comment">//: possibilities.</span>
<span id="L19" class="LineNr"> 19 </span><span class="Comment">//:</span>
<span id="L20" class="LineNr"> 20 </span><span class="Comment">//: Refinements:</span>
<span id="L21" class="LineNr"> 21 </span><span class="Comment">//:  * You can call a single continuation multiple times, and it will preserve</span>
<span id="L22" class="LineNr"> 22 </span><span class="Comment">//:    the state of its local variables at each stack frame between calls.</span>
<span id="L23" class="LineNr"> 23 </span><span class="Comment">//:    The stack frames of a continuation are not destroyed until the</span>
<span id="L24" class="LineNr"> 24 </span><span class="Comment">//:    continuation goes out of scope. See continuation2.mu.</span>
<span id="L25" class="LineNr"> 25 </span><span class="Comment">//:  * 'return-continuation-until-mark' doesn't consume the mark, so you can</span>
<span id="L26" class="LineNr"> 26 </span><span class="Comment">//:    return multiple continuations based on a single mark. In combination</span>
<span id="L27" class="LineNr"> 27 </span><span class="Comment">//:    with the fact that 'return-continuation-until-mark' can return from</span>
<span id="L28" class="LineNr"> 28 </span><span class="Comment">//:    regular calls, just as long as there was an earlier call to</span>
<span id="L29" class="LineNr"> 29 </span><span class="Comment">//:    'call-with-continuation-mark', this gives us a way to create resumable</span>
<span id="L30" class="LineNr"> 30 </span><span class="Comment">//:    recipes. See continuation3.mu.</span>
<span id="L31" class="LineNr"> 31 </span><span class="Comment">//:  * 'return-continuation-until-mark' can take ingredients to return just</span>
<span id="L32" class="LineNr"> 32 </span><span class="Comment">//:    like other 'return' instructions. It just implicitly also returns a</span>
<span id="L33" class="LineNr"> 33 </span><span class="Comment">//:    continuation as the first result. See continuation4.mu.</span>
<span id="L34" class="LineNr"> 34 </span><span class="Comment">//:  * Conversely, you can pass ingredients to a continuation when calling it,</span>
<span id="L35" class="LineNr"> 35 </span><span class="Comment">//:    to make it available to products of 'return-continuation-until-mark'.</span>
<span id="L36" class="LineNr"> 36 </span><span class="Comment">//:    See continuation5.mu.</span>
<span id="L37" class="LineNr"> 37 </span><span class="Comment">//:  * There can be multiple continuation marks on the stack at once;</span>
<span id="L38" class="LineNr"> 38 </span><span class="Comment">//:    'call-with-continuation-mark' and 'return-continuation-until-mark' both</span>
<span id="L39" class="LineNr"> 39 </span><span class="Comment">//:    need to pass in a tag to coordinate on the correct mark. This allows us</span>
<span id="L40" class="LineNr"> 40 </span><span class="Comment">//:    to save multiple continuations for different purposes (say if one is</span>
<span id="L41" class="LineNr"> 41 </span><span class="Comment">//:    for exceptions) with overlapping stack frames. See exception.mu.</span>
<span id="L42" class="LineNr"> 42 </span><span class="Comment">//:</span>
<span id="L43" class="LineNr"> 43 </span><span class="Comment">//: Inspired by James and Sabry, &quot;Yield: Mainstream delimited continuations&quot;,</span>
<span id="L44" class="LineNr"> 44 </span><span class="Comment">//: Workshop on the Theory and Practice of Delimited Continuations, 2011.</span>
<span id="L45" class="LineNr"> 45 </span><span class="Comment">//: <a href="https://www.cs.indiana.edu/~sabry/papers/yield.pdf">https://www.cs.indiana.edu/~sabry/papers/yield.pdf</a></span>
<span id="L46" class="LineNr"> 46 </span><span class="Comment">//:</span>
<span id="L47" class="LineNr"> 47 </span><span class="Comment">//: Caveats:</span>
<span id="L48" class="LineNr"> 48 </span><span class="Comment">//:  * At the moment we can't statically type-check continuations. So we raise</span>
<span id="L49" class="LineNr"> 49 </span><span class="Comment">//:    runtime errors for a call that doesn't return a continuation when the</span>
<span id="L50" class="LineNr"> 50 </span><span class="Comment">//:    caller expects, or one that returns a continuation when the caller</span>
<span id="L51" class="LineNr"> 51 </span><span class="Comment">//:    doesn't expect it. This shouldn't cause memory corruption, though.</span>
<span id="L52" class="LineNr"> 52 </span><span class="Comment">//:    There should still be no way to lookup addresses that aren't allocated.</span>
<span id="L53" class="LineNr"> 53 </span>
<span id="L54" class="LineNr"> 54 </span><span class="Delimiter">:(before &quot;End Mu Types Initialization&quot;)</span>
<span id="L55" class="LineNr"> 55 </span><a href='010vm.cc.html#L125'>type_ordinal</a> continuation = <span class="Special">Type_ordinal</span>[<span class="Constant">&quot;continuation&quot;</span>] = <span class="Special">Next_type_ordinal</span>++<span class="Delimiter">;</span>
<span id="L56" class="LineNr"> 56 </span><span class="Special">Type</span>[continuation]<span class="Delimiter">.</span>name = <span class="Constant">&quot;continuation&quot;</span><span class="Delimiter">;</span>
<span id="L57" class="LineNr"> 57 </span>
<span id="L58" class="LineNr"> 58 </span><span class="Comment">//: A continuation can be called like a recipe.</span>
<span id="L59" class="LineNr"> 59 </span><span class="Delimiter">:(before &quot;End <a href='072recipe.cc.html#L335'>is_mu_recipe</a> Atom Cases(r)&quot;)</span>
<span id="L60" class="LineNr"> 60 </span><span class="Normal">if</span> <span class="Delimiter">(</span>r<span class="Delimiter">.</span>type<span class="Delimiter">-&gt;</span>name == <span class="Constant">&quot;continuation&quot;</span><span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Constant"> true</span><span class="Delimiter">;</span>
<span id="L61" clas<style>pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */</style><div class="highlight"><pre><span></span><span class="cp">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;</span>
<span class="p">&lt;</span><span class="nt">html</span><span class="p">&gt;&lt;</span><span class="nt">head</span><span class="p">&gt;&lt;</span><span class="nt">title</span><span class="p">&gt;</span>Python: module test.tc_bookmarks<span class="p">&lt;/</span><span class="nt">title</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">head</span><span class="p">&gt;&lt;</span><span class="nt">body</span> <span class="na">bgcolor</span><span class="o">=</span><span class="s">&quot;#f0f0f8&quot;</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">table</span> <span class="na">width</span><span class="o">=</span><span class="s">&quot;100%&quot;</span> <span class="na">cellspacing</span><span class="o">=</span><span class="s">0</span> <span class="na">cellpadding</span><span class="o">=</span><span class="s">2</span> <span class="na">border</span><span class="o">=</span><span class="s">0</span> <span class="na">summary</span><span class="o">=</span><span class="s">&quot;heading&quot;</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">tr</span> <span class="na">bgcolor</span><span class="o">=</span><span class="s">&quot;#7799ee&quot;</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">td</span> <span class="na">valign</span><span class="o">=</span><span class="s">bottom</span><span class="p">&gt;</span><span class="ni">&amp;nbsp;</span><span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#ffffff&quot;</span> <span class="na">face</span><span class="o">=</span><span class="s">&quot;helvetica, arial&quot;</span><span class="p">&gt;</span><span class="ni">&amp;nbsp;</span><span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;&lt;</span><span class="nt">big</span><span class="p">&gt;&lt;</span><span class="nt">big</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;test.html&quot;</span><span class="p">&gt;&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#ffffff&quot;</span><span class="p">&gt;</span>test<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>.tc_bookmarks<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">big</span><span class="p">&gt;&lt;/</span><span class="nt">big</span><span class="p">&gt;&lt;/</span><span class="nt">font</span><span class="p">&gt;&lt;/</span><span class="nt">td</span>
<span class="p">&gt;&lt;</span><span class="nt">td</span> <span class="na">align</span><span class="o">=</span><span class="s">right</span> <span class="na">valign</span><span class="o">=</span><span class="s">bottom</span>
<span class="p">&gt;&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#ffffff&quot;</span> <span class="na">face</span><span class="o">=</span><span class="s">&quot;helvetica, arial&quot;</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;.&quot;</span><span class="p">&gt;</span>index<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;&lt;</span><span class="nt">br</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;file:/home/hut/ranger/test/tc_bookmarks.py&quot;</span><span class="p">&gt;</span>/home/hut/ranger/test/tc_bookmarks.py<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;&lt;/</span><span class="nt">font</span><span class="p">&gt;&lt;/</span><span class="nt">td</span><span class="p">&gt;&lt;/</span><span class="nt">tr</span><span class="p">&gt;&lt;/</span><span class="nt">table</span><span class="p">&gt;</span>
    <span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;&lt;/</span><span class="nt">p</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">table</span> <span class="na">width</span><span class="o">=</span><span class="s">&quot;100%&quot;</span> <span class="na">cellspacing</span><span class="o">=</span><span class="s">0</span> <span class="na">cellpadding</span><span class="o">=</span><span class="s">2</span> <span class="na">border</span><span class="o">=</span><span class="s">0</span> <span class="na">summary</span><span class="o">=</span><span class="s">&quot;section&quot;</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">tr</span> <span class="na">bgcolor</span><span class="o">=</span><span class="s">&quot;#aa55cc&quot;</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">td</span> <span class="na">colspan</span><span class="o">=</span><span class="s">3</span> <span class="na">valign</span><span class="o">=</span><span class="s">bottom</span><span class="p">&gt;</span><span class="ni">&amp;nbsp;</span><span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#ffffff&quot;</span> <span class="na">face</span><span class="o">=</span><span class="s">&quot;helvetica, arial&quot;</span><span class="p">&gt;&lt;</span><span class="nt">big</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>Modules<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">big</span><span class="p">&gt;&lt;/</span><span class="nt">font</span><span class="p">&gt;&lt;/</span><span class="nt">td</span><span class="p">&gt;&lt;/</span><span class="nt">tr</span><span class="p">&gt;</span>
    
<span class="p">&lt;</span><span class="nt">tr</span><span class="p">&gt;&lt;</span><span class="nt">td</span> <span class="na">bgcolor</span><span class="o">=</span><span class="s">&quot;#aa55cc&quot;</span><span class="p">&gt;&lt;</span><span class="nt">tt</span><span class="p">&gt;</span><span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</span><span class="p">&lt;/</span><span class="nt">tt</span><span class="p">&gt;&lt;/</span><span class="nt">td</span><span class="p">&gt;&lt;</span><span class="nt">td</span><span class="p">&gt;</span><span class="ni">&amp;nbsp;</span><span class="p">&lt;/</span><span class="nt">td</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">td</span> <span class="na">width</span><span class="o">=</span><span class="s">&quot;100%&quot;</span><span class="p">&gt;&lt;</span><span class="nt">table</span> <span class="na">width</span><span class="o">=</span><span class="s">&quot;100%&quot;</span> <span class="na">summary</span><span class="o">=</span><span class="s">&quot;list&quot;</span><span class="p">&gt;&lt;</span><span class="nt">tr</span><span class="p">&gt;&lt;</span><span class="nt">td</span> <span class="na">width</span><span class="o">=</span><span class="s">&quot;25%&quot;</span> <span class="na">valign</span><span class="o">=</span><span class="s">top</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;os.html&quot;</span><span class="p">&gt;</span>os<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">td</span><span class="p">&gt;&lt;</span><span class="nt">td</span> <span class="na">width</span><span class="o">=</span><span class="s">&quot;25%&quot;</span> <span class="na">valign</span><span class="o">=</span><span class="s">top</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;time.html&quot;</span><span class="p">&gt;</span>time<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">td</span><span class="p">&gt;&lt;</span><span class="nt">td</span> <span class="na">width</span><span class="o">=</span><span class="s">&quot;25%&quot;</span> <span class="na">valign</span><span class="o">=</span><span class="s">top</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;unittest.html&quot;</span><span class="p">&gt;</span>unittest<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">td</span><span class="p">&gt;&lt;</span><span class="nt">td</span> <span class="na">width</span><span class="o">=</span><span class="s">&quot;25%&quot;</span> <span class="na">valign</span><span class="o">=</span><span class="s">top</span><span class="p">&gt;&lt;/</span><span class="nt">td</span><span class="p">&gt;&lt;/</span><span class="nt">tr</span><span class="p">&gt;&lt;/</span><span class="nt">table</span><span class="p">&gt;&lt;/</span><span class="nt">td</span><span class="p">&gt;&lt;/</span><span class="nt">tr</span><span class="p">&gt;&lt;/</span><span class="nt">table</span><span class="p">&gt;&lt;</span><span class="nt">p</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">table</span> <span class="na">width</span><span class="o">=</span><span class="s">&quot;100%&quot;</span> <span class="na">cellspacing</span><span class="o">=</span><span class="s">0</span> <span class="na">cellpadding</span><span class="o">=</span><span class="s">2</span> <span class="na">border</span><span class="o">=</span><span class="s">0</span> <span class="na">summary</span><span class="o">=</span><span class="s">&quot;section&quot;</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">tr</span> <span class="na">bgcolor</span><span class="o">=</span><span class="s">&quot;#ee77aa&quot;</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">td</span> <span class="na">colspan</span><span class="o">=</span><span class="s">3</span> <span class="na">valign</span><span class="o">=</span><span class="s">bottom</span><span class="p">&gt;</span><span class="ni">&amp;nbsp;</span><span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#ffffff&quot;</span> <span class="na">face</span><span class="o">=</span><span class="s">&quot;helvetica, arial&quot;</span><span class="p">&gt;&lt;</span><span class="nt">big</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>Classes<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">big</span><span class="p">&gt;&lt;/</span><span class="nt">font</span><span class="p">&gt;&lt;/</span><span class="nt">td</span><span class="p">&gt;&lt;/</span><span class="nt">tr</span><span class="p">&gt;</span>
    
<span class="p">&lt;</span><span class="nt">tr</span><span class="p">&gt;&lt;</span><span class="nt">td</span> <span class="na">bgcolor</span><span class="o">=</span><span class="s">&quot;#ee77aa&quot;</span><span class="p">&gt;&lt;</span><span class="nt">tt</span><span class="p">&gt;</span><span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</span><span class="p">&lt;/</span><span class="nt">tt</span><span class="p">&gt;&lt;/</span><span class="nt">td</span><span class="p">&gt;&lt;</span><span class="nt">td</span><span class="p">&gt;</span><span class="ni">&amp;nbsp;</span><span class="p">&lt;/</span><span class="nt">td</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">td</span> <span class="na">width</span><span class="o">=</span><span class="s">&quot;100%&quot;</span><span class="p">&gt;&lt;</span><span class="nt">dl</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">font</span> <span class="na">face</span><span class="o">=</span><span class="s">&quot;helvetica, arial&quot;</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;unittest.html#TestCase&quot;</span><span class="p">&gt;</span>unittest.TestCase<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>(<span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;__builtin__.html#object&quot;</span><span class="p">&gt;</span>__builtin__.object<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>)
<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">dd</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">font</span> <span class="na">face</span><span class="o">=</span><span class="s">&quot;helvetica, arial&quot;</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;test.tc_bookmarks.html#TestDisplayable&quot;</span><span class="p">&gt;</span>TestDisplayable<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">dd</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>
 <span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">table</span> <span class="na">width</span><span class="o">=</span><span class="s">&quot;100%&quot;</span> <span class="na">cellspacing</span><span class="o">=</span><span class="s">0</span> <span class="na">cellpadding</span><span class="o">=</span><span class="s">2</span> <span class="na">border</span><span class="o">=</span><span class="s">0</span> <span class="na">summary</span><span class="o">=</span><span class="s">&quot;section&quot;</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">tr</span> <span class="na">bgcolor</span><span class="o">=</span><span class="s">&quot;#ffc8d8&quot;</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">td</span> <span class="na">colspan</span><span class="o">=</span><span class="s">3</span> <span class="na">valign</span><span class="o">=</span><span class="s">bottom</span><span class="p">&gt;</span><span class="ni">&amp;nbsp;</span><span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#000000&quot;</span> <span class="na">face</span><span class="o">=</span><span class="s">&quot;helvetica, arial&quot;</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable&quot;</span><span class="p">&gt;</span>class <span class="p">&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>TestDisplayable<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>(<span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;unittest.html#TestCase&quot;</span><span class="p">&gt;</span>unittest.TestCase<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>)<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;&lt;/</span><span class="nt">td</span><span class="p">&gt;&lt;/</span><span class="nt">tr</span><span class="p">&gt;</span>
    
<span class="p">&lt;</span><span class="nt">tr</span><span class="p">&gt;&lt;</span><span class="nt">td</span> <span class="na">bgcolor</span><span class="o">=</span><span class="s">&quot;#ffc8d8&quot;</span><span class="p">&gt;&lt;</span><span class="nt">tt</span><span class="p">&gt;</span><span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span><span class="p">&lt;/</span><span class="nt">tt</span><span class="p">&gt;&lt;/</span><span class="nt">td</span><span class="p">&gt;&lt;</span><span class="nt">td</span><span class="p">&gt;</span><span class="ni">&amp;nbsp;</span><span class="p">&lt;/</span><span class="nt">td</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">td</span> <span class="na">width</span><span class="o">=</span><span class="s">&quot;100%&quot;</span><span class="p">&gt;&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;</span>Method resolution order:<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">dd</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;test.tc_bookmarks.html#TestDisplayable&quot;</span><span class="p">&gt;</span>TestDisplayable<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;&lt;/</span><span class="nt">dd</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">dd</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;unittest.html#TestCase&quot;</span><span class="p">&gt;</span>unittest.TestCase<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;&lt;/</span><span class="nt">dd</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">dd</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;__builtin__.html#object&quot;</span><span class="p">&gt;</span>__builtin__.object<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;&lt;/</span><span class="nt">dd</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">hr</span><span class="p">&gt;</span>
Methods defined here:<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-setUp&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>setUp<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>(self)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-tearDown&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>tearDown<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>(self)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-test_adding_bookmarks&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>test_adding_bookmarks<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>(self)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-test_messing_around&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>test_messing_around<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>(self)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-test_sharing_bookmarks_between_instances&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>test_sharing_bookmarks_between_instances<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>(self)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">hr</span><span class="p">&gt;</span>
Methods inherited from <span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;unittest.html#TestCase&quot;</span><span class="p">&gt;</span>unittest.TestCase<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>:<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-__call__&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>__call__<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>(self, *args, **kwds)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-__eq__&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>__eq__<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>(self, other)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-__hash__&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>__hash__<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>(self)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-__init__&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>__init__<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>(self, methodName<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#909090&quot;</span><span class="p">&gt;</span>=&#39;runTest&#39;<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;</span>)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">dd</span><span class="p">&gt;&lt;</span><span class="nt">tt</span><span class="p">&gt;</span>Create<span class="ni">&amp;nbsp;</span>an<span class="ni">&amp;nbsp;</span>instance<span class="ni">&amp;nbsp;</span>of<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>class<span class="ni">&amp;nbsp;</span>that<span class="ni">&amp;nbsp;</span>will<span class="ni">&amp;nbsp;</span>use<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>named<span class="ni">&amp;nbsp;</span>test<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
method<span class="ni">&amp;nbsp;</span>when<span class="ni">&amp;nbsp;</span>executed.<span class="ni">&amp;nbsp;</span>Raises<span class="ni">&amp;nbsp;</span>a<span class="ni">&amp;nbsp;</span>ValueError<span class="ni">&amp;nbsp;</span>if<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>instance<span class="ni">&amp;nbsp;</span>does<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
not<span class="ni">&amp;nbsp;</span>have<span class="ni">&amp;nbsp;</span>a<span class="ni">&amp;nbsp;</span>method<span class="ni">&amp;nbsp;</span>with<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>specified<span class="ni">&amp;nbsp;</span>name.<span class="p">&lt;/</span><span class="nt">tt</span><span class="p">&gt;&lt;/</span><span class="nt">dd</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-__ne__&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>__ne__<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>(self, other)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-__repr__&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>__repr__<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>(self)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-__str__&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>__str__<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>(self)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-assertAlmostEqual&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>assertAlmostEqual<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span> = failUnlessAlmostEqual(self, first, second, places<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#909090&quot;</span><span class="p">&gt;</span>=7<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;</span>, msg<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#909090&quot;</span><span class="p">&gt;</span>=None<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;</span>)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">dd</span><span class="p">&gt;&lt;</span><span class="nt">tt</span><span class="p">&gt;</span>Fail<span class="ni">&amp;nbsp;</span>if<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>two<span class="ni">&amp;nbsp;</span>objects<span class="ni">&amp;nbsp;</span>are<span class="ni">&amp;nbsp;</span>unequal<span class="ni">&amp;nbsp;</span>as<span class="ni">&amp;nbsp;</span>determined<span class="ni">&amp;nbsp;</span>by<span class="ni">&amp;nbsp;</span>their<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
difference<span class="ni">&amp;nbsp;</span>rounded<span class="ni">&amp;nbsp;</span>to<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>given<span class="ni">&amp;nbsp;</span>number<span class="ni">&amp;nbsp;</span>of<span class="ni">&amp;nbsp;</span>decimal<span class="ni">&amp;nbsp;</span>places<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
(default<span class="ni">&amp;nbsp;</span>7)<span class="ni">&amp;nbsp;</span>and<span class="ni">&amp;nbsp;</span>comparing<span class="ni">&amp;nbsp;</span>to<span class="ni">&amp;nbsp;</span>zero.<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
<span class="ni">&amp;nbsp;</span><span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
Note<span class="ni">&amp;nbsp;</span>that<span class="ni">&amp;nbsp;</span>decimal<span class="ni">&amp;nbsp;</span>places<span class="ni">&amp;nbsp;</span>(from<span class="ni">&amp;nbsp;</span>zero)<span class="ni">&amp;nbsp;</span>are<span class="ni">&amp;nbsp;</span>usually<span class="ni">&amp;nbsp;</span>not<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>same<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
as<span class="ni">&amp;nbsp;</span>significant<span class="ni">&amp;nbsp;</span>digits<span class="ni">&amp;nbsp;</span>(measured<span class="ni">&amp;nbsp;</span>from<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>most<span class="ni">&amp;nbsp;</span>signficant<span class="ni">&amp;nbsp;</span>digit).<span class="p">&lt;/</span><span class="nt">tt</span><span class="p">&gt;&lt;/</span><span class="nt">dd</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-assertAlmostEquals&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>assertAlmostEquals<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span> = failUnlessAlmostEqual(self, first, second, places<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#909090&quot;</span><span class="p">&gt;</span>=7<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;</span>, msg<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#909090&quot;</span><span class="p">&gt;</span>=None<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;</span>)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">dd</span><span class="p">&gt;&lt;</span><span class="nt">tt</span><span class="p">&gt;</span>Fail<span class="ni">&amp;nbsp;</span>if<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>two<span class="ni">&amp;nbsp;</span>objects<span class="ni">&amp;nbsp;</span>are<span class="ni">&amp;nbsp;</span>unequal<span class="ni">&amp;nbsp;</span>as<span class="ni">&amp;nbsp;</span>determined<span class="ni">&amp;nbsp;</span>by<span class="ni">&amp;nbsp;</span>their<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
difference<span class="ni">&amp;nbsp;</span>rounded<span class="ni">&amp;nbsp;</span>to<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>given<span class="ni">&amp;nbsp;</span>number<span class="ni">&amp;nbsp;</span>of<span class="ni">&amp;nbsp;</span>decimal<span class="ni">&amp;nbsp;</span>places<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
(default<span class="ni">&amp;nbsp;</span>7)<span class="ni">&amp;nbsp;</span>and<span class="ni">&amp;nbsp;</span>comparing<span class="ni">&amp;nbsp;</span>to<span class="ni">&amp;nbsp;</span>zero.<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
<span class="ni">&amp;nbsp;</span><span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
Note<span class="ni">&amp;nbsp;</span>that<span class="ni">&amp;nbsp;</span>decimal<span class="ni">&amp;nbsp;</span>places<span class="ni">&amp;nbsp;</span>(from<span class="ni">&amp;nbsp;</span>zero)<span class="ni">&amp;nbsp;</span>are<span class="ni">&amp;nbsp;</span>usually<span class="ni">&amp;nbsp;</span>not<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>same<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
as<span class="ni">&amp;nbsp;</span>significant<span class="ni">&amp;nbsp;</span>digits<span class="ni">&amp;nbsp;</span>(measured<span class="ni">&amp;nbsp;</span>from<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>most<span class="ni">&amp;nbsp;</span>signficant<span class="ni">&amp;nbsp;</span>digit).<span class="p">&lt;/</span><span class="nt">tt</span><span class="p">&gt;&lt;/</span><span class="nt">dd</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-assertEqual&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>assertEqual<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span> = failUnlessEqual(self, first, second, msg<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#909090&quot;</span><span class="p">&gt;</span>=None<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;</span>)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">dd</span><span class="p">&gt;&lt;</span><span class="nt">tt</span><span class="p">&gt;</span>Fail<span class="ni">&amp;nbsp;</span>if<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>two<span class="ni">&amp;nbsp;</span>objects<span class="ni">&amp;nbsp;</span>are<span class="ni">&amp;nbsp;</span>unequal<span class="ni">&amp;nbsp;</span>as<span class="ni">&amp;nbsp;</span>determined<span class="ni">&amp;nbsp;</span>by<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>&#39;==&#39;<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
operator.<span class="p">&lt;/</span><span class="nt">tt</span><span class="p">&gt;&lt;/</span><span class="nt">dd</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-assertEquals&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>assertEquals<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span> = failUnlessEqual(self, first, second, msg<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#909090&quot;</span><span class="p">&gt;</span>=None<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;</span>)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">dd</span><span class="p">&gt;&lt;</span><span class="nt">tt</span><span class="p">&gt;</span>Fail<span class="ni">&amp;nbsp;</span>if<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>two<span class="ni">&amp;nbsp;</span>objects<span class="ni">&amp;nbsp;</span>are<span class="ni">&amp;nbsp;</span>unequal<span class="ni">&amp;nbsp;</span>as<span class="ni">&amp;nbsp;</span>determined<span class="ni">&amp;nbsp;</span>by<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>&#39;==&#39;<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
operator.<span class="p">&lt;/</span><span class="nt">tt</span><span class="p">&gt;&lt;/</span><span class="nt">dd</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-assertFalse&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>assertFalse<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span> = failIf(self, expr, msg<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#909090&quot;</span><span class="p">&gt;</span>=None<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;</span>)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">dd</span><span class="p">&gt;&lt;</span><span class="nt">tt</span><span class="p">&gt;</span>Fail<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>test<span class="ni">&amp;nbsp;</span>if<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>expression<span class="ni">&amp;nbsp;</span>is<span class="ni">&amp;nbsp;</span>true.<span class="p">&lt;/</span><span class="nt">tt</span><span class="p">&gt;&lt;/</span><span class="nt">dd</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-assertNotAlmostEqual&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>assertNotAlmostEqual<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span> = failIfAlmostEqual(self, first, second, places<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#909090&quot;</span><span class="p">&gt;</span>=7<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;</span>, msg<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#909090&quot;</span><span class="p">&gt;</span>=None<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;</span>)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">dd</span><span class="p">&gt;&lt;</span><span class="nt">tt</span><span class="p">&gt;</span>Fail<span class="ni">&amp;nbsp;</span>if<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>two<span class="ni">&amp;nbsp;</span>objects<span class="ni">&amp;nbsp;</span>are<span class="ni">&amp;nbsp;</span>equal<span class="ni">&amp;nbsp;</span>as<span class="ni">&amp;nbsp;</span>determined<span class="ni">&amp;nbsp;</span>by<span class="ni">&amp;nbsp;</span>their<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
difference<span class="ni">&amp;nbsp;</span>rounded<span class="ni">&amp;nbsp;</span>to<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>given<span class="ni">&amp;nbsp;</span>number<span class="ni">&amp;nbsp;</span>of<span class="ni">&amp;nbsp;</span>decimal<span class="ni">&amp;nbsp;</span>places<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
(default<span class="ni">&amp;nbsp;</span>7)<span class="ni">&amp;nbsp;</span>and<span class="ni">&amp;nbsp;</span>comparing<span class="ni">&amp;nbsp;</span>to<span class="ni">&amp;nbsp;</span>zero.<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
<span class="ni">&amp;nbsp;</span><span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
Note<span class="ni">&amp;nbsp;</span>that<span class="ni">&amp;nbsp;</span>decimal<span class="ni">&amp;nbsp;</span>places<span class="ni">&amp;nbsp;</span>(from<span class="ni">&amp;nbsp;</span>zero)<span class="ni">&amp;nbsp;</span>are<span class="ni">&amp;nbsp;</span>usually<span class="ni">&amp;nbsp;</span>not<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>same<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
as<span class="ni">&amp;nbsp;</span>significant<span class="ni">&amp;nbsp;</span>digits<span class="ni">&amp;nbsp;</span>(measured<span class="ni">&amp;nbsp;</span>from<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>most<span class="ni">&amp;nbsp;</span>signficant<span class="ni">&amp;nbsp;</span>digit).<span class="p">&lt;/</span><span class="nt">tt</span><span class="p">&gt;&lt;/</span><span class="nt">dd</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;TestDisplayable-assertNotAlmostEquals&quot;</span><span class="p">&gt;&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>assertNotAlmostEquals<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span> = failIfAlmostEqual(self, first, second, places<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#909090&quot;</span><span class="p">&gt;</span>=7<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;</span>, msg<span class="p">&lt;</span><span class="nt">font</span> <span class="na">color</span><span class="o">=</span><span class="s">&quot;#909090&quot;</span><span class="p">&gt;</span>=None<span class="p">&lt;/</span><span class="nt">font</span><span class="p">&gt;</span>)<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">dd</span><span class="p">&gt;&lt;</span><span class="nt">tt</span><span class="p">&gt;</span>Fail<span class="ni">&amp;nbsp;</span>if<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>two<span class="ni">&amp;nbsp;</span>objects<span class="ni">&amp;nbsp;</span>are<span class="ni">&amp;nbsp;</span>equal<span class="ni">&amp;nbsp;</span>as<span class="ni">&amp;nbsp;</span>determined<span class="ni">&amp;nbsp;</span>by<span class="ni">&amp;nbsp;</span>their<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
difference<span class="ni">&amp;nbsp;</span>rounded<span class="ni">&amp;nbsp;</span>to<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>given<span class="ni">&amp;nbsp;</span>number<span class="ni">&amp;nbsp;</span>of<span class="ni">&amp;nbsp;</span>decimal<span class="ni">&amp;nbsp;</span>places<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
(default<span class="ni">&amp;nbsp;</span>7)<span class="ni">&amp;nbsp;</span>and<span class="ni">&amp;nbsp;</span>comparing<span class="ni">&amp;nbsp;</span>to<span class="ni">&amp;nbsp;</span>zero.<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
<span class="ni">&amp;nbsp;</span><span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
Note<span class="ni">&amp;nbsp;</span>that<span class="ni">&amp;nbsp;</span>decimal<span class="ni">&amp;nbsp;</span>places<span class="ni">&amp;nbsp;</span>(from<span class="ni">&amp;nbsp;</span>zero)<span class="ni">&amp;nbsp;</span>are<span class="ni">&amp;nbsp;</span>usually<span class="ni">&amp;nbsp;</span>not<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>same<span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
as<span class="ni">&amp;nbsp;</span>significant<span class="ni">&amp;nbsp;</span>digits<span class="ni">&amp;nbsp;</span>(measured<span class="ni">&amp;nbsp;</span>from<span class="ni">&amp;nbsp;</span>the<span class="ni">&amp;nbsp;</span>most<span class="ni">&amp;nbsp;</span>signficant<span class="ni">&amp;nbsp;</span>digit).<span class="p">&lt;/</span><span class="nt">tt</span><span class="p">&gt;&lt;/</span><span class="nt">dd</span><span class="p">&gt;&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>

<span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;&lt;</span><span class="nt">dt</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">name</span><span