mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 15:00:18 +00:00
generate in-page TOCs on demand
This commit is contained in:
@@ -14,27 +14,7 @@ th{font-family:inherit !important}
|
||||
<blockquote class=q>
|
||||
<p><span>❝</span> Don’t bury your burden in saintly silence. You have a problem? Great. Rejoice, dive in, and investigate. <span>❞</span><br>— <cite>Ven. Henepola Gunararatana</cite>
|
||||
</blockquote>
|
||||
<ol>
|
||||
<li><a href=#divingin>Diving in</a>
|
||||
<li><a href=#declaringfunctions>Declaring functions</a>
|
||||
<ol>
|
||||
<li><a href=#datatypes>How Python's datatypes compare to other programming languages</a>
|
||||
</ol>
|
||||
<li><a href=#readability>Writing readable code</a>
|
||||
<ol>
|
||||
<li><a href=#docstrings>Docstrings</a>
|
||||
<li><a href=#functionannotations>Function annotations</a>
|
||||
<li><a href=#styleconventions>Style conventions</a>
|
||||
</ol>
|
||||
<li><a href=#everythingisanobject>Everything is an object</a>
|
||||
<ol>
|
||||
<li><a href=#importsearchpath>The <code>import</code> search path</a>
|
||||
<li><a href=#whatsanobject>What's an object?</a>
|
||||
</ol>
|
||||
<li><a href=#indentingcode>Indenting code</a>
|
||||
<li><a href=#runningscripts>Running scripts</a>
|
||||
<li><a href=#furtherreading>Further reading</a>
|
||||
</ol>
|
||||
<p id=toc>
|
||||
<h2 id=divingin>Diving in</h2>
|
||||
<p class=f>Books about programming usually start with a bunch of boring chapters about fundamentals and eventually work up to building something useful. Let's skip all that. Here is a complete, working Python program. It probably makes absolutely no sense to you. Don't worry about that, because you're going to dissect it line by line. But read through it first and see what, if anything, you can make of it.
|
||||
<p id=noscript>[The code examples will be easier to follow if you enable Javascript, but whatever.]
|
||||
|
||||
Reference in New Issue
Block a user