#16064: Python 3 preparation: Handle basestring (Py2) vs. str (Py3)
----------------------------+----------------------------
Reporter: wluebbe | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.2
Component: distribution | Keywords: python3
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
----------------------------+----------------------------
From the Python 2 documentation
[[https://docs.python.org/2/library/functions.html#basestring|basestring()]]:
This abstract type is the superclass for str and unicode. It cannot be
called or instantiated, but it can be used to test whether an object is an
instance of str or unicode. isinstance(obj, basestring) is equivalent to
isinstance(obj, (str, unicode)).
New in version 2.3.
This is not available in Python 3.
The tool 2to3 changes {{{basestring}}} into {{{str}}} (the only string
type in Py3).
There are 27 effected modules.
This ticket is tracked as a dependency of meta-ticket ticket:16052.
--
Ticket URL: <http://trac.sagemath.org/ticket/16064>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.