Open matheus2740 opened 4 years ago
Explicit conversion between GDString and python str is intended. The idea is to be aware of the place those conversion appear given they should be much more costly than regular python str to str operations.
Of course I'm open to discuss this if can draw a good rational ;-)
IMO automatic conversion would be better, especially for new users who might not understand the difference (of course one could argue that such users should be using GDScript instead of python, but anyway...) I understand conversion is costly, but I don't think string operations are common enough to be a performance penalty (if user wants to do heavy string processing in the game loop they most probably know what they are doing anyway.) In either case that's a design decision and up to you :)
Code:
self.input_box
is of typeLineEdit
, acquired viaself.get_node("InputBox")