定义一个类
class ZApi:
def __init__(self, symbol, access_key=None ,secret_key=None, passphrase=None ,host=None):
self._host = host
def request(self, uri):
..........
使用类
host="http://localhost:8083"
zApi = ZApi( host)
结果
url = urljoin(self._host, uri)
print(self._host)
打印值为 None
到底是哪里出错了?