header fiddling

This commit is contained in:
Mark Pilgrim
2009-08-04 20:09:27 -07:00
parent 9fef46462c
commit 7a59e9d895
+2 -2
View File
@@ -306,7 +306,7 @@ except ImportError:
<p>By the end of this <code>try..except</code> block, you have imported <em>some</em> module and named it <var>etree</var>. Since both modules implement a common <abbr>API</abbr>, the rest of your code doesn&#8217;t need to keep checking which module got imported. And since the module that <em>did</em> get imported is always called <var>etree</var>, the rest of your code doesn&#8217;t need to be littered with <code>if</code> statements to call differently-named modules.
<h3 id=nameerror>Unbound Variables</h3>
<h2 id=nameerror>Unbound Variables</h2>
<p>Take another look at this line of code from the <code>approximate_size()</code> function:
@@ -324,7 +324,7 @@ NameError: name 'x' is not defined</samp>
<p>You will thank Python for this one day.
<h3 id=case>Everything is Case-Sensitive</h3>
<h2 id=case>Everything is Case-Sensitive</h2>
<p>All names in Python are case-sensitive: variable names, function names, class names, module names, exception names. If you can get it, set it, call it, construct it, import it, or raise it, it&#8217;s case-sensitive.