SyntaxFix
Write A Post
Hire A Developer
Questions
As in this answer to a similar question, there is no need to hack settings. It is much simpler to write:
print(foo.to_string())