The Python Oracle

How do I change the string representation of a Python class?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Magical Minnie Puzzles

--

Chapters
00:00 Question
00:50 Accepted answer (Score 379)
01:22 Answer 2 (Score 45)
03:01 Thank you

--

Full question
https://stackoverflow.com/questions/4912...

Accepted answer links:
[Special Method Names - Basic Customization]: http://docs.python.org/reference/datamod...

Answer 2 links:
[How to make a class JSON serializable]: https://stackoverflow.com/questions/3768...
http://www.laurentluce.com/posts/python-.../

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #string #python3x #printing

#avk47