[Python-3000] A couple 2to3 questions

skip at pobox.com skip at pobox.com
Sun Aug 26 04:54:56 CEST 2007


I ran 2to3 over the Doc/tools directory.  This left a number of problems
which I initially began replacing manually.  I then realized that it would
be better to tweak 2to3.  A couple things I wondered about:

    1. How are we supposed to maintain changes to Doc/tools?  Running svn
       status doesn't show any changes.

    2. I noticed a couple places where it seems to replace "if isinstance"
       with "ifinstance".  Seems like an output bug of some sort.

    3. Here are some obvious transformations (I don't know what to do to
       make these changes to 2to3):

          * replace uppercase and lowercase from the string module with
            their "ascii_"-prefixed names.

          * replace types.StringType and types.UnicodeType with str and
            unicode.

Skip


More information about the Python-3000 mailing list