Skip to content

Commit b467f83

Browse files
authored
Merge pull request godotengine#8310 from Calinou/upgrading-to-godot-4-array-slice
Mention `Array.slice()`'s exclusive end parameter in Upgrading to Godot 4
2 parents 9e4018d + 6cf0a7f commit b467f83

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tutorials/migrating/upgrading_to_godot_4.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,9 @@ The most notable examples of this are:
581581
- :ref:`class_AnimatedSprite2D` and :ref:`class_AnimatedSprite3D`'s ``playing``
582582
property was removed. Use ``play()``/``stop()`` method instead OR configure
583583
``autoplay`` animation via the SpriteFrames bottom panel (but not both at once).
584+
- :ref:`class_Array`'s ``slice()`` second parameter (``end``) is now *exclusive*,
585+
instead of being inclusive. For example, this means that
586+
``[1, 2, 3].slice(0, 1)`` now returns ``[1]`` instead of ``[1, 2]``.
584587
- :ref:`class_BaseButton`'s signals are now ``button_up`` and ``button_down``.
585588
The ``pressed`` property is now ``button_pressed``.
586589
- :ref:`class_Camera2D`'s ``rotating`` property was replaced by

0 commit comments

Comments
 (0)