Tuesday, 3 September 2013

__repr__ vs. __str__ , where would you use one or the other?

__repr__ vs. __str__ , where would you use one or the other?

I'm new to python. Learning slowly. In regards to classes, I don't see the
big difference between __repr__ and __str__ . Is there a time to use one
or the other? I've read the docs and can't understand the point of
__str__, am I missing something?

No comments:

Post a Comment