【发布时间】:2015-08-09 05:35:06
【问题描述】:
*我在 python 3 中使用 re.sub 时出错 **我的代码是:
chunk = re.sub(b'-----------------------------(.+)--\r\n', '', chunk
我有这个错误:
Type Error: sequence item 0: `expected` a bytes-like object, str found
它在 python2 中工作,但在 python3.4 中不起作用。 另外我使用tornadofreamwork 请帮我解决这个问题。
【问题讨论】:
标签: python regex tornado python-3.4