In python, is there a section of a PEP against the method __str__
returning a multiline string?
Pro: PyCharm does not tell me off and Google draws a blank
Contra: I could see it would cause an inelegant response if someone concatenated it, feels un-pythonic and I am not sure I can recall seeing one βbar in my own code
So I am not sure if to just have a multiline __str__
return (keep it simple) or to leave alone __str__
(i.e. returns <class foo>
) and have a special module (e.g. foo.report()
).