Skip to content

Add key= support for max() function #305

Closed

Description

@Levtastic

In python, you can add a function to a call to max() using the key= keyword arg, which lets you do more complex logic for finding the value you want, but in Transcrypt it looks like max() is mapped directly to Math.max() and so doesn't have this ability.

Activity

  1. self-assigned this
    on Mar 25, 2017
  2. Levtastic commented on Apr 17, 2017

    @Levtastic
    Author

    If this is added, I'd like to also request that it be added to functions like sorted()/list.sort() too, as I also use it in that situation a lot, as well as min()/max()

    Edit: apologies, it seems that key is already supported for sorting!

  3. JennaSys commented on Jul 5, 2024

    @JennaSys
    Collaborator

    Added in dev_3.9.3 branch to be released in v3.9.3

  4. assigned and unassigned on Jul 5, 2024
  5. JennaSys commented on Jul 17, 2024

    @JennaSys
    Collaborator

    Merged to master on PR #876

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions