What's up with the all caps TRUE and FALSE ? - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP) +---- Forum: Scripting questions (https://www.gimp-forum.net/Forum-Scripting-questions) +---- Thread: What's up with the all caps TRUE and FALSE ? (/Thread-What-s-up-with-the-all-caps-TRUE-and-FALSE) |
What's up with the all caps TRUE and FALSE ? - ChameleonScales - 10-15-2021 In gimpfu, TRUE is not a boolean but an instance: Code: ➤> type(TRUE) I'm wondering why it was made that way and whether it can have unwanted consequences to use python's boolean "True" instead in commands of this kind: Code: pdb.gimp_edit_paste(channel, True) RE: What's up with the all caps TRUE and FALSE ? - Ofnuts - 10-16-2021 Well: Code: ➤> TRUE And gimpenums.py in all its glory: Code: from _gimpenums import * So I think this means you should use True instead: ) RE: What's up with the all caps TRUE and FALSE ? - ChameleonScales - 10-16-2021 Thanks, that clarifies it. I didn't get that deprecation warning that gimpenums.py seems to be there for though. I hope that's normal. |