Skip to content

Commit

Permalink
使用更明确的表达
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudaice committed May 10, 2013
1 parent c2ebfd8 commit 8ba8735
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jieba/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8ba8735

Please sign in to comment.