-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Rename Array.invert() to Array.reverse() #46991
Conversation
Does the same internally for List and Vector<>, which includes all PackedArray types.
3ae748a
to
755c70b
Compare
Rebased following merge of #47024. |
Makes sense to me, that's consistent with Python 3's Anyone against the change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems consensual!
Thanks! |
Does this set or return? I find |
@MaaaxiKing The return type is unchanged – it's still I think we should make this method return a new Array instead. Since renaming the method is a breaking change already, we might as well do it for 4.0. In general, I'd steer clear from methods that modify things in-place as much as possible. |
Unlike other ideally immutable types, |
@madmiraal Please use doctool with your renaming PRs. This one broke the alphanumeric order which results in unnecessary changes for others. |
We should probably include it in the CI checks somehow. |
@madmiraal I've been wanting to do this for a long time, but right now doctool has to open a window first, and there's no headless DisplayServer available for Godot as of the DisplayServer split. |
Unless I'm doing something wrong, the |
It doesn't warn but it should fix the order. If there's any diff, then it could fail CI (if we could run it on CI). |
Are you running with |
I was not. It works when I include the |
Does the same internally for List and Vector<>, which includes all PackedArray types.
Part of #16863.