0

__repr__

According to the official documentation,   __repr__() is used to compute an official string representation of an object.. what does official string representation mean ?

9th Jun 2021, 8:01 AM
kushal
3 Antworten
+ 2
"official" string representaion means a representation that has all information about the object
11th Jun 2021, 6:59 AM
Scarlet Witch
Scarlet Witch - avatar
0
Scarlet Witch can you give some example ..
11th Jun 2021, 9:13 AM
kushal
0
Python __repr__() function returns the object representation in string format. This method is called when repr() function is invoked on the object.  __repr__ goal is to be unambiguous https://code.sololearn.com/cgZOJNGcS4Zk/?ref=app
11th Jun 2021, 1:37 PM
Scarlet Witch
Scarlet Witch - avatar