From a36f0e2e4637180aa73c8e9159752e4c94ac39d0 Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Sun, 1 Feb 2009 11:56:19 -0500 Subject: [PATCH] fixed typos --- porting-code-to-python-3-with-2to3.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/porting-code-to-python-3-with-2to3.html b/porting-code-to-python-3-with-2to3.html index 4f42a34..e0837f2 100644 --- a/porting-code-to-python-3-with-2to3.html +++ b/porting-code-to-python-3-with-2to3.html @@ -120,7 +120,7 @@ h3:before{counter-increment:h3;content:"A." counter(h2) "." counter(h3) ". "} ① u"PapayaWhip" "PapayaWhip" -① +② ur"PapayaWhip\foo" r"PapayaWhip\foo" @@ -492,7 +492,7 @@ for an_iterator in a_sequence_of_iterators:
  • This one is a bit tricky. If you have a local variable named next, then it takes precedence over the new global next() function. In this case, you need to call the iterator's special __next()__ method to get the next item in the sequence. (Alternatively, you could also refactor the code so the local variable wasn't named next, but 2to3 will not do that for you automatically.)

    filter() global function

    -

    In Python 2, the filter() function returned a list, the result of filtering a sequence through a function that returned True or False for each item in the sequence. In Python 3, the filter() function returns an interator, not a list. +

    In Python 2, the filter() function returned a list, the result of filtering a sequence through a function that returned True or False for each item in the sequence. In Python 3, the filter() function returns an iterator, not a list.

    skip over this table
    Notes