3
AttributeError: el módulo 'datetime' no tiene el atributo 'strptime'
Aquí está mi Transactionclase: 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 Y cuando estoy tratando de ejecutar la datefunción: tr = Transaction('AAPL', 600, '2013-10-25') print tr.date Recibo el siguiente error: self.date = …
153
python
class
python-2.7