mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
added "porting code to python 3 with 2to3" sections to index.html
This commit is contained in:
@@ -11,7 +11,7 @@ h1,h2,h3{font-size:medium}
|
||||
h1{background:papayawhip;color:#000;width:100%;margin:0}
|
||||
#index h2{margin-left:1.75em}
|
||||
#index h3{margin-left:3.5em}
|
||||
pre,tt{white-space:pre-wrap;font-size:medium;line-height:2.154}
|
||||
pre{white-space:pre-wrap;font-size:medium;line-height:2.154}
|
||||
cite{font-style:normal}
|
||||
img{border:0}
|
||||
.framed{border:1px solid}
|
||||
|
||||
+201
-44
@@ -9,10 +9,8 @@
|
||||
<meta name="description" content="Python 3 from novice to pro">
|
||||
</head>
|
||||
<body id="index">
|
||||
<p><cite>Dive into Python 3</cite> will cover Python 3 and its differences from Python 2. Compared to the original <cite><a href="http://diveintopython.org/">Dive into Python</a></cite>, it will be about 50% revised and 50% new material.</p>
|
||||
<p>I will publish drafts online as I go. The final book will be published on paper by Apress. The book will remain online under the <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">CC-BY-3.0</a> license.</p>
|
||||
<p>Below is the draft table of contents. There is no text yet.</p>
|
||||
<p>Yes, that is <code>PapayaWhip</code>. All hail <code>PapayaWhip</code>.</p>
|
||||
<p><cite>Dive into Python 3</cite> will cover Python 3 and its differences from Python 2. Compared to the original <cite><a href="http://diveintopython.org/">Dive into Python</a></cite>, it will be about 50% revised and 50% new material. I will publish drafts online as I go. The final book will be published on paper by Apress. The book will remain online under the <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">CC-BY-3.0</a> license.</p>
|
||||
<p>Below is the draft table of contents. Only a few chapters have been written so far. Yes, that is <code>PapayaWhip</code>. All hail <code>PapayaWhip</code>.</p>
|
||||
|
||||
<section>
|
||||
<h1>Installing Python</h1>
|
||||
@@ -334,15 +332,6 @@
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1><del>Scripts and streams</del></h1>
|
||||
|
||||
<section>
|
||||
<h2>...will be folded into other chapters...</h2>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>HTTP web services</h1>
|
||||
|
||||
@@ -403,15 +392,6 @@
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1><del>SOAP web services</del></h1>
|
||||
|
||||
<section>
|
||||
<h2>...no one will miss you...</h2>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Unit testing</h1>
|
||||
|
||||
@@ -491,15 +471,6 @@
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1><del>Functional programming</del></h1>
|
||||
|
||||
<section>
|
||||
<h2>...bits and pieces will be folded into other chapters...</h2>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Dynamic functions</h1>
|
||||
|
||||
@@ -580,38 +551,188 @@
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Migrating old code to Python 3</h1>
|
||||
<h1><a href="porting-code-to-python-3-with-2to3.html">Porting code to Python 3 with <code>2to3</code></a></h1>
|
||||
|
||||
<section>
|
||||
<h2>Diving in</h2>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#print"><code>print</code> statement</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>The 2to3 migration tool</h2>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#ne"><> comparison</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Things the 2to3 tools won't catch</h2>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#has_key"><code>has_key()</code> dictionary method</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Case study: feedparser</h2>
|
||||
<h3>Just shoot me</h3>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#dict"><code>keys()</code> dictionary method</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Summary</h2>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#dict"><code>items()</code> dictionary method</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#apply"><code>apply()</code> global function</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#intern"><code>intern()</code> global function</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#exec"><code>exec</code> statement</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#repr"><code>repr</code> literals (backticks)</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#except"><code>try...except</code> statement</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#raise"><code>raise</code> statement</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#throw"><code>throw</code> statement</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#long"><code>long</code> data type</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#xrange"><code>xrange()</code> global function</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#raw_input"><code>raw_input()</code> global function</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#input"><code>input()</code> global method</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#funcattrs"><code>func_*</code> function attributes</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#xreadlines"><code>xreadlines()</code> I/O method</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#imports">imports</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#tuple_params"><code>lambda</code> functions with multiple parameters</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#methodattrs"><code>__class__</code> special class attribute</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#next"><code>next()</code> iterator method</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#nonzero"><code>__nonzero__</code> special class attribute</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#numliterals">Number literals</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#renames"><code>sys.maxint</code></a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#unicode"><code>unicode()</code> global function</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#unicodeliteral">Unicode string literals</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#callable"><code>callable()</code> global function</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#filter"><code>filter()</code> global function</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#map"><code>map()</code> global function</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#zip"><code>zip()</code> global function</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#standarderror"><code>StandardError()</code> exception</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#types"><code class="filename">types</code> module constants</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#basestring"><code>basestring</code> datatype</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#itertools"><code class="filename">itertools</code> module</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#import">Relative imports</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#sys_exc"><code>sys.exc_type</code>, <code>sys.exc_value</code>, <code>sys.exc_traceback</code></a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#paren">List comprehensions over tuples</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#getcwdu"><code>os.getcwdu()</code> function</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#metaclass">Metaclasses</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#set_literal"><code>set()</code> literals</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#buffer"><code>buffer()</code> global function</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#wscomma">Whitespace around commas</a></h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2><a href="porting-code-to-python-3-with-2to3.html#idioms">Common idioms</a></h2>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Creating graphics with the Python Imaging Library</h1>
|
||||
|
||||
<section>
|
||||
<h2>...if it gets ported...</h2>
|
||||
</section>
|
||||
|
||||
<h1>Case study: porting <code>chardet</code> to Python 3</h1>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@@ -646,6 +767,15 @@
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Creating graphics with the Python Imaging Library</h1>
|
||||
|
||||
<section>
|
||||
<h2>...if it gets ported...</h2>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Where to go from here</h1>
|
||||
<p>Tentative because most of these have not been ported to Python 3 yet.</p>
|
||||
@@ -688,6 +818,33 @@
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1><del>Scripts and streams</del></h1>
|
||||
|
||||
<section>
|
||||
<h2>...will be folded into other chapters...</h2>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1><del>SOAP web services</del></h1>
|
||||
|
||||
<section>
|
||||
<h2>...no one will miss you...</h2>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1><del>Functional programming</del></h1>
|
||||
|
||||
<section>
|
||||
<h2>...bits and pieces will be folded into other chapters...</h2>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
<p class="c">© 2001-4, 2009 Mark Pilgrim, <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">CC-BY-3.0</a></p>
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user