摘要:
# -- coding: utf-8 --#自定义异常class myException(Exception): passdef division(x,y): if y == 1 : raise myException('y==1') #假如当y==1时,抛出自定义异常 return x/ytry: division(1,0)except ZeroDi... 阅读全文
摘要:
由ip查域名:(family, type, proto, canonname, sockaddr)=socket.getaddrinfo(host, port, family=0, type=0, proto=0, flags=0)#-*- coding='gb2312' -*-import soc... 阅读全文