SyntaxFix
Write A Post
Hire A Developer
Questions
Well, container objects' __str__ methods will use repr on their contents, not str. So you could use __repr__ instead of __str__, seeing as you're using an ID as the result.
__str__
repr
str
__repr__