diff options
author | Raymond Hettinger <python@rcn.com> | 2007-12-14 18:12:21 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2007-12-14 18:12:21 (GMT) |
commit | 366523c6671b4648382d19e791a1d98fd70e87b5 (patch) | |
tree | dfde3b6a46363fa0998301e85ad9277097d3a354 /Doc | |
parent | 48eca67ab984e024acdc3ee175d247a30e2ea33f (diff) | |
download | cpython-366523c6671b4648382d19e791a1d98fd70e87b5.zip cpython-366523c6671b4648382d19e791a1d98fd70e87b5.tar.gz cpython-366523c6671b4648382d19e791a1d98fd70e87b5.tar.bz2 |
Update method names for named tuples.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/whatsnew/2.6.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst index 14cefb9..eb2e17c 100644 --- a/Doc/whatsnew/2.6.rst +++ b/Doc/whatsnew/2.6.rst @@ -528,7 +528,7 @@ complete list of changes, or look through the CVS logs for all the details. ... 'id name type size') # Names are separated by spaces or commas. # 'id, name, type, size' would also work. - >>> var_type.__fields__ + >>> var_type._fields ('id', 'name', 'type', 'size') >>> var = var_type(1, 'frequency', 'int', 4) @@ -536,9 +536,9 @@ complete list of changes, or look through the CVS logs for all the details. 1 1 >>> print var[2], var.type # Equivalent int int - >>> var.__asdict__() + >>> var._asdict() {'size': 4, 'type': 'int', 'id': 1, 'name': 'frequency'} - >>> v2 = var.__replace__('name', 'amplitude') + >>> v2 = var._replace('name', 'amplitude') >>> v2 variable(id=1, name='amplitude', type='int', size=4) |