Docs: Use !r in __repr__ example (gh-146273)

This commit is contained in:
Peter Sutton 2026-04-01 17:16:36 +01:00 committed by GitHub
parent 255026d9ee
commit 021ee7fd6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1754,7 +1754,7 @@ are always available. They are listed here in alphabetical order.
self.age = age
def __repr__(self):
return f"Person('{self.name}', {self.age})"
return f"Person({self.name!r}, {self.age!r})"
.. function:: reversed(object, /)