godot: Parsing error when using 'not in'
line 19 always gives me an error(19,19): ‘:’ expected at the end of line
if component.type() not in database.keys():
This happens in everything I have tried not in with code wise. A helpful forum user pointed out another way to make it work http://godotengine.org/topics/14086 but I feel like this should be correct usage.
entitymanager.gd.txt
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 5
- Comments: 16 (10 by maintainers)
Maybe with
isn'tas syntactic sugar? 😛I would add
is nottoo if we’re going that route.The
not inoperator exists in Python but indeed not in GDScript. As to whether it should be implemented, I don’t have any strong opinion. As @Faustabov pointed it out, usingnot thing in listalready works fine, so the gain of supportednot indirectly would likely be minimal and add some complexity to the parser.