diff --git a/pinyinize.py b/pinyinize.py index d4d905c..8901d72 100644 --- a/pinyinize.py +++ b/pinyinize.py @@ -45,18 +45,19 @@ while hzwork: hzwork.pop(0) print "found and consumed %s"%res[0][0] elif not res and not lastres: # first char not found, using fallback barf - lastres = '[%s]'%tmpstr + lastres = '%s'%tmpstr hzwork.pop(0) print "%s not found, adding raw and breaking"%tmpstr break else: print "got empty result, breaking" + lastres += " " break - finres += lastres+" " + finres += lastres print "appending and deleting lastres %s, finres now: %s"%(lastres,finres) -print "\nfinished with: %s\n"%finres +print '\nfinished with:\n """\n%s\n"""\n'%finres