Python Flashcards
(1 cards)
1
Q
What does __repr__ do?
A
It creates a print function for your class basically. Like a tostring that automatically gets called if you just reference the variable.
What does __repr__ do?
It creates a print function for your class basically. Like a tostring that automatically gets called if you just reference the variable.