Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add key= support for max() function #305

Closed
Levtastic opened this issue Mar 25, 2017 · 3 comments
Closed

Add key= support for max() function #305

Levtastic opened this issue Mar 25, 2017 · 3 comments
Assignees

Comments

@Levtastic
Copy link

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.

@Levtastic
Copy link
Author

Levtastic commented Apr 17, 2017

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!

@JennaSys
Copy link
Collaborator

JennaSys commented Jul 5, 2024

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

@JennaSys JennaSys assigned JennaSys and unassigned JdeH Jul 5, 2024
@JennaSys
Copy link
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
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants