This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#encoding = utf-8 | |
import httplib2 | |
import json, sys, re | |
#from bs4 import BeautifulSoup | |
true = True | |
false = False | |
null = None | |
def query (self): | |
translateurl = 'http://openapi.baidu.com/public/2.0/bmt/translate?client_id=30jx9lLPxbMLWt2AKvz6OsSe&q=' + self + '&from=auto&to=zh' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*接口变量类型判断标准*/ | |
if v, ok := varI.(T); ok { // checked type assertion | |
Process(v) | |
return | |
} | |
// varI is not of type T |