From: Frank W. <fwi...@gm...> - 2006-05-27 02:22:17
|
Jython does not have a basestring type, and probably never will. It is kind of an implementation detail in CPython -- and will disappear in Python3000 anyway (although the following probably won't work in Py3000 eithen). You can get the some effect by using: >>> from types import StringTypes >>> str in StringTypes 1 >>> unicode in StringTypes 1 >>> type("s") in StringTypes 1 >>> type(u"s") in StringTypes 1 On 5/26/06, Jeff Norton <jn...@ac...> wrote: > > > > > I've got a lot of Python 2.3 code that uses the basestring builtin type. > E.g. > > if isinstance(obj, basestring): > > Jython 2.2a1 doesn't seeme to have a basestring builtin. Anyone know how = to > get access to it? > > Thanks, > > Jeff Norton. |