2
0
Эх сурвалжийг харах

Merge pull request #5264 from bearbybits/patch-1

Change square brackets to parentheses
Max Hilbrunner 3 жил өмнө
parent
commit
ddcd1c7c89

+ 3 - 3
tutorials/scripting/gdscript/gdscript_basics.rst

@@ -986,9 +986,9 @@ nature of the tab-based indentation, ``elif`` can be used instead of
 
 ::
 
-    if [expression]:
+    if (expression):
         statement(s)
-    elif [expression]:
+    elif (expression):
         statement(s)
     else:
         statement(s)
@@ -1003,7 +1003,7 @@ Short statements can be written on the same line as the condition::
 Sometimes, you might want to assign a different initial value based on a
 boolean expression. In this case, ternary-if expressions come in handy::
 
-    var x = [value] if [expression] else [value]
+    var x = (value) if (expression) else (value)
     y += 3 if y < 10 else -1
 
 Ternary-if expressions can be nested to handle more than 2 cases. When nesting