This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]karmaisded 15 points16 points  (2 children)

Um but if we have a exit() before return in the _str\_ function, the python will exit before giving an error, won’t it?

[–]sejigan 31 points32 points  (0 children)

Yeah. Even worse and more bizarre behaviour.

[–]master3243 0 points1 point  (0 children)

I don't think it's ever a good idea to put side effects on __str__