html outline of "porting code to python 3 with 2to3"

This commit is contained in:
Mark Pilgrim
2009-01-26 10:20:08 -05:00
parent 10dd4cff4c
commit 8bbbeb3d62
2 changed files with 333 additions and 2 deletions
+325
View File
@@ -1,4 +1,329 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Porting code to Python 3 with 2to3 - Dive into Python 3</title>
<link rel="stylesheet" type="text/css" href="dip3.css">
</head>
<body>
<h1>Porting code to Python 3 with <code>2to3</code></h1>
<ol class="toc">
</ol>
<section>
<h2 id="ne">ne</h2>
<p>FIXME intro</p>
<table>
<tr>
<th>Python 2</th>
<th>Python 3</th>
</tr>
<tr>
<td><code>if x <> y:</code></td>
<td><code>if x != y:</code></td>
</tr>
</table>
</section>
<section>
<h2 id="has_key">has_key</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="apply">apply</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="intern">intern</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="print">print</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="exec">exec</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="repr">repr</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="except">except</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="raise">raise</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="throw">throw</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="long">long</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="dict">dict</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="xrange">xrange</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="raw_input">raw_input</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="funcattrs">funcattrs</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="xreadlines">xreadlines</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="imports">imports</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="imports2">imports2</h2>
<p>FIXME intro</p>
</section>
1533: fixer = None
<section>
<h2 id="urllib">urllib</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="input">input</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="tuple_params">tuple_params</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="methodattrs">methodattrs</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="next">next</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="nonzero">nonzero</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="numliterals">numliterals</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="renames">renames</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="unicode">unicode</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="callable">callable</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="filter">filter</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="map">map</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="zip">zip</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="standarderror">standarderror</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="types">types</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="idioms">idioms</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="basestring">basestring</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="buffer">buffer</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="future">future</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="itertools">itertools</h2>
<p>FIXME intro</p>
</section>
3256: fixer = 'itertools_imports'
<section>
<h2 id="import">import</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="set_literal">set_literal</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="sys_exc">sys_exc</h2>
<p>FIXME intro</p>
</section>
<section>
<h2 id="paren">paren</h2>
<p>FIXME intro</p>
</section>
3657: fixer = 'metaclass'
3822: fixer = 'getcwdu'
</ol>
# Lib/lib2to3/tests/test_fixers.py
- <>
- has_key
- apply()