Christian Heimes added the comment:

Guido van Rossum wrote:
> BTW we need a 2to3 fixer for this.  Should be trivial -- just replace
> *all* occurrences of basestring with str.

I believe you that it's trivial for *you* but I've never dealt with the
fixers or the grammar. Fortunately for me I was able to copy the fixer
for standarderror. It toke just some minor tweaks :)

Let's see if the mail interface can handle attachments.

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1258>
__________________________________
# Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer for basestring -> str
"""

# Local imports
from fixes import basefix
from fixes.util import Name

class FixBasestr(basefix.BaseFix):

    PATTERN = "'basestring'"

    def transform(self, node, results):
        return Name("str", prefix=node.get_prefix())

_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to