mirror of
https://github.com/python/cpython.git
synced 2026-04-15 08:11:10 +00:00
Docs: Use !r in __repr__ example (gh-146273)
This commit is contained in:
parent
255026d9ee
commit
021ee7fd6a
1 changed files with 1 additions and 1 deletions
|
|
@ -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, /)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue