sirius-utility-nodes
sirius-utility-nodes copied to clipboard
Feature: Self-documenting variables for formatted print string
So currently when writing the print statements, you often have to print something like Actor received event {event}
. Python's f-strings (linked) have a way around this, which I think would be applicable and useful here too.
In Python you can have a formatting string like Actor debug {velocity=}
, which essentially expands to Actor debug velocity={velocity}
. This would both keep the node size down, as well as provide a convenient shorthand for a 'labelled' variable.
I've tried the current behaviour, and while it exposes the var=
pin, it doesn't seem to be able to print it out, and instead prints out the label itself.
https://docs.python.org/3/whatsnew/3.8.html#f-strings-support-for-self-documenting-expressions-and-debugging