Author pitrou
Recipients hdima, pitrou, pje
Date 2008-12-22.15:01:34
SpamBayes Score 2.76278e-06
Marked as misclassified No
Message-id <>
FYI, instead of trying to do exhaustive type checking in _check_type(),
you can just rely on duck typing and catch the TypeError:

>>> str(b"a", "utf-8")
>>> str(bytearray(b"a"), "utf-8")
>>> str(memoryview(b"a"), "utf-8")
>>> str(1, "utf-8")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: coercing to str: need string or buffer, int found
Date User Action Args
2008-12-22 15:01:36pitrousetrecipients: + pitrou, pje, hdima
2008-12-22 15:01:35pitrousetmessageid: <>
2008-12-22 15:01:35pitroulinkissue4718 messages
2008-12-22 15:01:34pitroucreate