Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. import datetime
  2.  
  3. class Post:
  4. def __init__(self, titulo, link, fecha, autor, respuestas, visitas):
  5. self.titulo = titulo
  6. self.link = link
  7. self.fecha = fecha
  8. #self.fecha = datetime.datetime.strptime(fecha, '%a, %d %b %Y %H:%M:%S +0000').date()
  9. self.autor = autor
  10. self.respuestas = respuestas
  11. self.visitas = visitas
  12.  
  13. def __str__(self):
  14. return "\nTítulo: " + self.titulo+"\nLink: " + self.link+"\nFecha: " + self.fecha+"\nAutor: "+self.autor+"\nRespuestas: "+self.respuestas+"\nVisitas: "+self.visitas
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement