Witam,
czy ktoś mógłby mi wytłumaczyć, jak działa, co właściwie robi i jak używać funkcji repr ? Wyczytałem tutaj:
http://docs.python.org/2/reference/datamodel.html
object.repr(self)
Called by the repr() built-in function and by string conversions (reverse quotes) to compute the “official” string representation of an object. If at all possible, this should look like a valid Python expression that could be used to recreate an object with the same value (given an appropriate environment). If this is not possible, a string of the form <...some useful description...> should be returned. The return value must be a string object. If a class defines repr() but not str(), then repr() is also used when an “informal” string representation of instances of that class is required.
This is typically used for debugging, so it is important that the representation is information-rich and unambiguous.
Ale szczerze mówiąc niewiele z tego rozumiem, temu zwracam się z prośbą na forum.
Z góry dziękuję.