From 8ba8735f4652324fa877a8b05989e0fa729498e5 Mon Sep 17 00:00:00 2001 From: cloudaice Date: Fri, 10 May 2013 11:09:41 +0200 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=9B=B4=E6=98=8E=E7=A1=AE?= =?UTF-8?q?=E7=9A=84=E8=A1=A8=E8=BE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jieba/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jieba/__init__.py b/jieba/__init__.py index 4ce7e17..db29cc3 100644 --- a/jieba/__init__.py +++ b/jieba/__init__.py @@ -190,7 +190,7 @@ def __cut_DAG(sentence): for t in regognized: yield t def cut(sentence,cut_all=False): - if not ( type(sentence) is unicode): + if not isinstance(sentence, unicode): try: sentence = sentence.decode('utf-8') except: