mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Fix signature in example
This commit is contained in:
parent
6f7e6fb7a2
commit
8465ae8cea
1 changed files with 1 additions and 1 deletions
|
@ -394,7 +394,7 @@ Example::
|
|||
def __asdict__(self):
|
||||
'Return a new dict mapping field names to their values'
|
||||
return dict(zip(('x', 'y'), self))
|
||||
def __replace__(self, field, value):
|
||||
def __replace__(self, **kwds):
|
||||
'Return a new Point object replacing specified fields with new values'
|
||||
return Point(**dict(zip(('x', 'y'), self) + kwds.items()))
|
||||
x = property(itemgetter(0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue