Python Flashcards

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly