missing asterisms. seriously.

This commit is contained in:
Mark Pilgrim
2009-09-23 09:00:35 -04:00
parent 35cd215948
commit b7ef6d1c7a
+4
View File
@@ -304,6 +304,8 @@ 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.
<p class=a>&#x2042;
<h2 id=nameerror>Unbound Variables</h2>
<p>Take another look at this line of code from the <code>approximate_size()</code> function:
@@ -322,6 +324,8 @@ NameError: name 'x' is not defined</samp>
<p>You will thank Python for this one day.
<p class=a>&#x2042;
<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.