• Re: Python-list Digest, Vol 232, Issue 1 (2/2)

    From Christman, Roger Graydon@21:1/5 to Thomas Passin on Mon Jan 2 00:30:51 2023
    [continued from previous message]

    separation between mutating and non-mutating methods, and to help catch mistakes resulting from mixing them up.

    --
    Greg
    -- https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.python.org%2Fmailman%2Flistinfo%2Fpython-list&data=05%7C01%7Cdvl%40psu.edu%7C744c83fc485a4b1c79db08daec19a436%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C638081892123929669%
    7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=etYqO01OszhEpqgjLeKQTMC9b3wT0sc%2FcN8oJo9eEhk%3D&reserved=0




    ------------------------------

    Subject: Digest Footer

    -- https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.python.org%2Fmailman%2Flistinfo%2Fpython-list&data=05%7C01%7Cdvl%40psu.edu%7C744c83fc485a4b1c79db08daec19a436%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C638081892123929669%7CUnknown%
    7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=etYqO01OszhEpqgjLeKQTMC9b3wT0sc%2FcN8oJo9eEhk%3D&reserved=0


    ------------------------------

    End of Python-list Digest, Vol 232, Issue 1 *******************************************

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From avi.e.gross@gmail.com@21:1/5 to Thomas Passin on Mon Jan 2 01:13:58 2023
    [continued from previous message]

    Of course there are other paths in that direction, such as setting an attribute of the list/object first that affects how things get
    returned but that seems more cumbersome and makes all kinds of errors
    more likely. Still, that is a path often used by some Python modules
    where objects are created and then tweaked to behave in various ways when
    later methods are invoked.

    But is any of it needed? The current system generally works fine and
    we have seen many ways to get other results without tampering with the current implementation.

    This may be yet another example of people who come to python with pre-existing bias, such as insisting it work like another language
    they have used, or wanting the computer to do what they MEANT rather
    than what they explicitly or implicitly programmed!


    -----Original Message-----
    From: Python-list
    <python-list-bounces+avi.e.gross=gmail.com@python.org> On Behalf Of
    Greg Ewing
    Sent: Saturday, December 31, 2022 7:21 PM
    To: python-list@python.org
    Subject: Re: NoneType List

    On 1/01/23 11:36 am, avi.e.gross@gmail.com wrote:
    And, of course, we had the philosophical question of why the feature
    was designed to not return anything ... rather than return the
    changed object.

    My understanding is that Guido designed it that way to keep a clear separation between mutating and non-mutating methods, and to help
    catch mistakes resulting from mixing them up.

    --
    Greg
    --
    https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail .python.org%2Fmailman%2Flistinfo%2Fpython-list&data=05%7C01%7Cdvl%40ps u.edu%7C744c83fc485a4b1c79db08daec19a436%7C7cf48d453ddb4389a9c1c115526 eb52e%7C0%7C0%7C638081892123929669%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4 wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7 C&sdata=etYqO01OszhEpqgjLeKQTMC9b3wT0sc%2FcN8oJo9eEhk%3D&reserved=0




    ------------------------------

    Subject: Digest Footer

    --
    https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.pytho n.org%2Fmailman%2Flistinfo%2Fpython-list&data=05%7C01%7Cdvl%40psu.edu%7C744c 83fc485a4b1c79db08daec19a436%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C63 8081892123929669%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzI iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=etYqO01OszhEpqgjLeKQTM C9b3wT0sc%2FcN8oJo9eEhk%3D&reserved=0


    ------------------------------

    End of Python-list Digest, Vol 232, Issue 1 *******************************************
    --
    https://mail.python.org/mailman/listinfo/python-list

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)