Boolean values use lowercase but print in uppercase

Godot version

3.4 beta 4

System information

Windows 10

Issue description

Boolean values must be specified in lowercase

var my_true_var:bool = true
var my_false_var:bool = false

Yet when I print these out for debugging purposes they are printed with an uppercase letter

print(my_true_var)
True
print(my_false_var)
False

For my save/load functions for my game I need to manually correct the case to be able to feed game variables. I believe the case should be preserved so the keywords are correct.

Steps to reproduce

	var mybool:bool=false
	
	print_debug(mybool)
	printerr(mybool)
	printraw(mybool)
	printt(mybool)
	push_error(str(mybool))
	push_warning(str(mybool))
	prints(mybool)

Minimal reproduction project

No response

1 thought on “Boolean values use lowercase but print in uppercase

  1. For my save/load functions for my game I need to manually correct the case to be able to feed game variables. I believe the case should be preserved so the keywords are correct.

    Not sure what your serialization process looks like, but you can use var2str and str2var here instead of manual conversion.

Comments are closed.