Код: Выделить всё
def __str__(self):
return f'{self.data} - {self.time},\nTags: {self.tags},\nText: {self.text}'
Рабочий код: < /p>
Код: Выделить всё
def __str__(self):
return f'{self.date} - {self.time},\nTags:' + \
f' {self.tags},\nText: {self.text}'
< /code>
output: < /p>
2017-08-30 - 17:58:08.307055,
Tags: test tag,
Text: test text
Подробнее здесь: https://stackoverflow.com/questions/459 ... -in-python