Merge pull request #35480 from YeldhamDev/doc_parenthesis_removal

Remove unnecessary parenthesis from code examples
This commit is contained in:
Rémi Verschelde 2020-01-23 18:33:22 +01:00 committed by GitHub
commit 93aba68026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1167,10 +1167,10 @@
Since [constant OK] has value 0, and all other failure codes are positive integers, it can also be used in boolean checks, e.g.:
[codeblock]
var err = method_that_returns_error()
if (err != OK):
if err != OK:
print("Failure!)
# Or, equivalent:
if (err):
if err:
print("Still failing!)
[/codeblock]
</constant>

View File

@ -13,7 +13,7 @@
if dir.open(path) == OK:
dir.list_dir_begin()
var file_name = dir.get_next()
while (file_name != ""):
while file_name != "":
if dir.current_is_dir():
print("Found directory: " + file_name)
else: