Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Repr() function
#2
Quote:Return a string containing a printable representation of an object. For many types, this function makes an attempt to return a string that would yield an object with the same value when passed to eval(), otherwise the representation is a string enclosed in angle brackets that contains the name of the type of the object together with additional information often including the name and address of the object. A class can control what this function returns for its instances by defining a __repr__() method.
Reply


Messages In This Thread
Repr() function - by Valentina - Aug-19-2019, 01:28 PM
RE: Repr() function - by fishhook - Aug-19-2019, 01:50 PM
RE: Repr() function - by Valentina - Aug-22-2019, 11:13 AM
RE: Repr() function - by perfringo - Aug-22-2019, 11:28 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  ascii() (repr() in py2) Skaperen 1 3,959 Jun-05-2017, 10:32 PM
Last Post: Ofnuts
  str vs repr Skaperen 9 6,083 Jun-05-2017, 01:04 AM
Last Post: Skaperen
  when repr() fails Skaperen 8 6,763 May-03-2017, 02:48 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020