mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
quoting attribute values is a hard habit to break
This commit is contained in:
@@ -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>①</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 “Your First Python Program”"><span>☜</span></a> <a rel=next href=strings.html title="onward to “Strings”"><span>☞</span></a>
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
|
||||
Reference in New Issue
Block a user