generate in-page TOCs on demand

This commit is contained in:
Mark Pilgrim
2009-03-19 01:42:12 -04:00
parent cfeee5d73d
commit 3b9c6c67e9
8 changed files with 29 additions and 189 deletions
+1 -15
View File
@@ -14,21 +14,7 @@ body{counter-reset:h1 3}
<p><span>&#x275D;</span> I&#8217;m telling you this &#8217;cause you&#8217;re one of my friends.<br>
My alphabet starts where your alphabet ends! <span>&#x275E;</span><br>&mdash; <cite>Dr. Seuss, On Beyond Zebra!</cite>
</blockquote>
<ol>
<li><a href=#divingin>Diving in</a>
<li><a href=#one-ring-to-rule-them-all>Unicode</a>
<ol>
<li>How strings are stored in memory
<li>Converting between different character encodings
<li><a href=#py-encoding>Specifying character encoding in <code>.py</code> files</a>
</ol>
<li>Strings in Python 3
<li>Common string operations
<li>Formatting strings
<li><a href=#string-module>The <code>string</code> module</a>
<li><a href=#byte-arrays>Strings vs. bytes</a>
<li><a href=#furtherreading>Further reading</a>
</ol>
<p id=toc>&nbsp;
<h2 id=divingin>Diving in</h2>
<p class=f>Chinese has thousands of characters. The <a href="http://en.wikipedia.org/wiki/Rotokas_alphabet">Rotokas alphabet</a> of <a href="http://en.wikipedia.org/wiki/Bougainville_Province">Bougainville</a> is the smallest alphabet in the world, with just 12 letters. English has 26, plus a handful of punctuation marks. Python 3 can handle all of these languages, and more.