Fredrik Lundh wrote: > > >>> "!" in ("a", None) > 0 > >>> u"!" in ("a", None) > Traceback (innermost last): > File "<stdin>", line 1, in ? > TypeError: expected a character buffer object Good catch. The same happens when you try to compare Unicode and a different non-string type: >>> '1' == None 0 >>> u'1' == None Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: expected a character buffer object The reason is the same in both cases: failing auto-coercion. I will send a patch for this tomorrow. -- Marc-Andre Lemburg ______________________________________________________________________ Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4