Skip to content

Lambdas: final example too complex? #78

Open

Description

@JoshMcCullough

I think the final example on the lambdas page is too complex and uses some constructs which haven't been covered yet. See #77.

Activity

  1. baudotg commented on Aug 7, 2025

    @baudotg

    Arriving lately on the subject...
    If final example is still Parallel sorting of lists, I personally do not matter that much about complexity, but I'm rather concerned by this misleading title: it does indeed also sort list2, but NOT the the way one would expect from a parallel sort

    >>> list1=[2,1]
    >>> list2=['a','b']
    >>> data = sorted(zip(list1, list2))
    >>> list1, list2 = map(lambda t: list(t), zip(*data))
    >>> list2
    ['b', 'a']
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions