quoting attribute values is a hard habit to break

This commit is contained in:
Mark Pilgrim
2009-05-20 17:34:24 -04:00
parent ab23b6b659
commit 52b451d753
11 changed files with 87 additions and 58 deletions
+5 -5
View File
@@ -150,7 +150,7 @@ body{counter-reset:h1 2}
</ol>
<h3 id=numbers-in-a-boolean-context>Numbers In A Boolean Context</h3>
<aside>Zero values are false, and non-zero values are true.</aside>
<p>You can use numbers <a href="#booleans">in a boolean context</a>, such as an <code>if</code> statement. Zero values are false, and non-zero values are true.
<p>You can use numbers <a href=#booleans>in a boolean context</a>, such as an <code>if</code> statement. Zero values are false, and non-zero values are true.
<pre class=screen>
<a><samp class=p>>>> </samp><kbd>def is_it_true(anything):</kbd> <span>&#x2460;</span></a>
<samp class=p>... </samp><kbd> if anything:</kbd>
@@ -452,10 +452,10 @@ KeyError: 'db.diveintopython3.org'</samp></pre>
<samp>yes, it's true</samp></pre>
<h2 id=furtherreading>Further Reading</h2>
<ul>
<li><a href="http://docs.python.org/3.0/library/fractions.html">The <code>fractions</code> module</a>
<li><a href="http://docs.python.org/3.0/library/math.html">The <code>math</code> module</a>
<li><a href="http://www.python.org/dev/peps/pep-0237/"><abbr>PEP</abbr> 237: Unifying Long Integers and Integers</a>
<li><a href="http://www.python.org/dev/peps/pep-0238/"><abbr>PEP</abbr> 238: Changing the Division Operator</a>
<li><a href=http://docs.python.org/3.0/library/fractions.html>The <code>fractions</code> module</a>
<li><a href=http://docs.python.org/3.0/library/math.html>The <code>math</code> module</a>
<li><a href=http://www.python.org/dev/peps/pep-0237/><abbr>PEP</abbr> 237: Unifying Long Integers and Integers</a>
<li><a href=http://www.python.org/dev/peps/pep-0238/><abbr>PEP</abbr> 238: Changing the Division Operator</a>
</ul>
<p class=nav><a rel=prev href=your-first-python-program.html title="back to &#8220;Your First Python Program&#8221;"><span>&#x261C;</span></a> <a rel=next href=strings.html title="onward to &#8220;Strings&#8221;"><span>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;9 <a href=about.html>Mark Pilgrim</a>