[Python-checkins] r60216 - in python/trunk: Lib/encodings/__init__.py Lib/optparse.py Misc/NEWS Parser/tokenizer.c
Neal Norwitz
nnorwitz at gmail.com
Thu Jan 24 22:45:04 CET 2008
On Jan 24, 2008 1:36 PM, Christian Heimes <lists at cheimes.de> wrote:
> Neal Norwitz wrote:
> > isinstance(x, (str, unicode)) works just fine too. or
> > isinstance(x, types.StringTypes)
>> isinstance(x, (str, unicode)) does not work when Python is build with
> --enable-unicode=no. I could simplify the code with isinstance(x,
I was assuming you would do the full transformation. I really just
wanted to point out that you can use a tuple rather than call
isinstance twice.
> basestring) but it won't be b/w with older releases of Python.
I didn't check how old this code needs to work with. Hmm, actually
optparse is maintained outside of python. See this comment at the
top:
# Python developers: please do not make changes to this file, since
# it is automatically generated from the Optik source code.
It hassn't changed very often though.
n
More information about the Python-checkins
mailing list