3
AttributionError: mô đun 'datetime' không có thuộc tính 'strptime'
Đây là Transactionlớp học của tôi : class Transaction(object): def __init__(self, company, num, price, date, is_buy): self.company = company self.num = num self.price = price self.date = datetime.strptime(date, "%Y-%m-%d") self.is_buy = is_buy Và khi tôi đang cố chạy datechức năng: tr = Transaction('AAPL', 600, '2013-10-25') print tr.date Tôi nhận được …
153
python
class
python-2.7