From: Terry Jan Reedy Date: Fri, 23 May 2014 04:34:12 +0000 (-0400) Subject: Issue #21545: Add .pop example and tweak comment about pure mutation methods. X-Git-Tag: v3.4.2rc1~515 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e17de091012eb928c5734856eeaf2bb8f99e40c1;p=thirdparty%2FPython%2Fcpython.git Issue #21545: Add .pop example and tweak comment about pure mutation methods. Patch prepared by David Harrigan. --- diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index 24d2d2ec3aa3..f2b66f70d830 100644 --- a/Doc/tutorial/datastructures.rst +++ b/Doc/tutorial/datastructures.rst @@ -111,10 +111,15 @@ An example that uses most of the list methods:: >>> a.sort() >>> a [-1, 1, 66.25, 333, 333, 1234.5] + >>> a.pop() + 1234.5 + >>> a + [-1, 1, 66.25, 333, 333] You might have noticed that methods like ``insert``, ``remove`` or ``sort`` that -modify the list have no return value printed -- they return ``None``. [1]_ This -is a design principle for all mutable data structures in Python. +only modify the list have no return value printed -- they return the default +``None``. [1]_ This is a design principle for all mutable data structures in +Python. .. _tut-lists-as-stacks: diff --git a/Misc/ACKS b/Misc/ACKS index a3230061ff60..97d00eabdf9e 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -507,6 +507,7 @@ Barry Hantman Lynda Hardman Derek Harland Jason Harper +David Harrigan Brian Harring Jonathan Hartley Travis B. Hartwell