Re: unicode: strange exception (part 2)

I wrote:
"!" in ("a", None) 0 u"!" in ("a", None) Traceback (innermost last): File "<stdin>", line 1, in ? TypeError: expected a character buffer object
with the latest version, I get:
"!" in ("a", None) 0 u"!" in ("a", None) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: coercing to Unicode: need string or charbuffer
is this really an improvement? looks like writing code that works with any kind of strings will be harder than I thought... </F>

with the latest version, I get:
"!" in ("a", None) 0 u"!" in ("a", None) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: coercing to Unicode: need string or charbuffer
is this really an improvement?
looks like writing code that works with any kind of strings will be harder than I thought...
Are you totally up-to-date? I get
u"!" in ("a", None) 0
--Guido van Rossum (home page: http://www.python.org/~guido/)
participants (2)
-
Fredrik Lundh
-
Guido van Rossum