diff --git a/advanced-iterators.html b/advanced-iterators.html index 34bf23d..40e07f2 100644 --- a/advanced-iterators.html +++ b/advanced-iterators.html @@ -415,6 +415,8 @@ for guess in itertools.permutations(digits, len(characters)):

Many, many thanks to Raymond Hettinger for agreeing to relicense his code so I could port it to Python 3 and use it as the basis for this chapter. +

© 2001–9 Mark Pilgrim diff --git a/case-study-porting-chardet-to-python-3.html b/case-study-porting-chardet-to-python-3.html index 55652c3..c6bb05e 100644 --- a/case-study-porting-chardet-to-python-3.html +++ b/case-study-porting-chardet-to-python-3.html @@ -1177,6 +1177,9 @@ tests\EUC-JP\arclamp.jp.xml EUC-JP with confide

  • You need to understand your program. Thoroughly. Preferably because you wrote it, but at the very least, you need to be comfortable with all its quirks and musty corners. The bugs are everywhere.
  • Test cases are essential. Don't port anything without them. Don't even try. The only reason I have any confidence at all that chardet works in Python 3 is because I had a test suite that exercised every line of code in the entire library. I never would have found half of these problems with manual spot-checking. + +

    © 2001–9 Mark Pilgrim diff --git a/dip3.css b/dip3.css index 1272460..1f48b4d 100644 --- a/dip3.css +++ b/dip3.css @@ -60,7 +60,7 @@ abbr{font-variant:small-caps;text-transform:lowercase;letter-spacing:0.1em} .q span{font-size:large} .note{margin:3.5em 4.94em} .note span{display:block;float:left;font-size:xx-large;line-height:0.875;margin:0 0.22em 0 -1.22em;color:steelblue} -.c,pre,.w,.w a,.d{line-height:2.154} +.c,pre,.w,.w a,.d{line-height:2.154;clear:both} .f:first-letter{float:left;color:lightblue;padding:0.11em 4px 0 0;font:normal 4em/0.68 serif} p,ul,ol{margin:1.75em 0;font-size:medium} @@ -110,3 +110,10 @@ h2,h3{margin-top:1.75em} #toc + h2:before{content:""} h3:before{counter-increment:h3;content:counter(h1) "." counter(h2) "." counter(h3) ". "} aside{display:block;float:right;font-style:oblique;font-size:xx-large;width:25%;margin:1.75em 0 .75em 1.75em;background:steelblue;color:white;padding:1.75em;border:1px solid;-moz-border-radius:1em;-webkit-border-radius:1em;border-radius:1em} + +/* previous/next navigation links */ + +.nav a{text-decoration:none;border:0;display:block} +.nav a:first-child{float:left} +.nav a:last-child{float:right} +.nav span{font-size:1000%;line-height:1;margin:0} \ No newline at end of file diff --git a/iterators-and-generators.html b/iterators-and-generators.html index 3497bb6..db64674 100644 --- a/iterators-and-generators.html +++ b/iterators-and-generators.html @@ -570,6 +570,8 @@ rules = LazyRules()

  • PEP 255: Simple Generators +

    © 2001–9 Mark Pilgrim diff --git a/mobile.css b/mobile.css index 51be0c9..1c950b2 100644 --- a/mobile.css +++ b/mobile.css @@ -59,3 +59,4 @@ h1:before{content:""} /* overrides */ .nm,.w,aside,form,form+p,.note span,.q span{display:none} dd{margin:0 0 0 1.75em} +.nav span{font-size:200%} \ No newline at end of file diff --git a/native-datatypes.html b/native-datatypes.html index 7151dea..1cff987 100644 --- a/native-datatypes.html +++ b/native-datatypes.html @@ -453,6 +453,7 @@ KeyError: 'db.diveintopython3.org'

  • PEP 237: Unifying Long Integers and Integers
  • PEP 238: Changing the Division Operator +

    © 2001–9 Mark Pilgrim diff --git a/notes.txt b/notes.txt index 2295e8b..5cf5ceb 100644 --- a/notes.txt +++ b/notes.txt @@ -15,7 +15,9 @@ http://www.alanwood.net/unicode/dingbats.html ⚠ - white warning sign (triangle with exclamation point inside) ☺ - white smiling face +☜ - white left pointing index ☞ - white right pointing index +☚ - black left pointing index ☛ - black right pointing index ☠ - skull and crossbones ☑ - ballot box with checkmark diff --git a/porting-code-to-python-3-with-2to3.html b/porting-code-to-python-3-with-2to3.html index 1bc265a..2ac9d02 100644 --- a/porting-code-to-python-3-with-2to3.html +++ b/porting-code-to-python-3-with-2to3.html @@ -1157,6 +1157,7 @@ do_stuff(a_list) do_stuff(a_list)

    FIXME: once the rest of the book is written, this appendix should contain copious links back to any chapter or section that touches on these features. +

    © 2001–9 Mark Pilgrim diff --git a/regular-expressions.html b/regular-expressions.html index e88d21c..83d892e 100644 --- a/regular-expressions.html +++ b/regular-expressions.html @@ -417,6 +417,7 @@ body{counter-reset:h1 4}

  • (x) in general is a remembered group. You can get the value of what matched by using the groups() method of the object returned by re.search.

    Regular expressions are extremely powerful, but they are not the correct solution for every problem. You should learn enough about them to know when they are appropriate, when they will solve your problems, and when they will cause more problems than they solve. +

    © 2001–9 Mark Pilgrim diff --git a/strings.html b/strings.html index 3fb7320..2b7a4ee 100644 --- a/strings.html +++ b/strings.html @@ -420,6 +420,8 @@ FIXME: move this to the intro of the upcoming files chapter?

  • PEP 3101: Advanced String Formatting +

    © 2001–9 Mark Pilgrim diff --git a/your-first-python-program.html b/your-first-python-program.html index 503a370..05e3198 100644 --- a/your-first-python-program.html +++ b/your-first-python-program.html @@ -223,6 +223,7 @@ if __name__ == "__main__":

  • PEP 8: Style Guide for Python Code discusses good indentation style.
  • Python Reference Manual explains what it means to say that everything in Python is an object, because some people are pedantic and like to discuss that sort of thing at great length. +

    © 2001–9 Mark Pilgrim