3
AttributeError: o módulo 'datetime' não tem atributo 'strptime'
Aqui está a minha Transactionturma: 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 E quando estou tentando executar a datefunção: tr = Transaction('AAPL', 600, '2013-10-25') print tr.date Estou recebendo o seguinte erro: self.date …
153
python
class
python-2.7