Parent Shortcut allows invalid names

When setting a parent shortcut name, invalid input is allowed for names that begin with a digit, eg:

However when accessing such references (via copy & paste reference) the following error is given:

This is a weird and confusing user experience. I’d say that either:
an error should be displayed when starting a parent shortcut name with a non-alpha character, or
the ‘paste reference’ context command should escape it appropriately.

Hi @hekuli,

while the parameter itself is just a string parameter and therefor won’t evaluate or sanity check the input, the containing operator should go into an error state and not only any reference to the invalid Parent Shortcut:

The background to this being an invalid identifier goes back to python itself and the inability of python to recognize identifiers as such if they start with a number. Python would try to use the identifier as a numeric literal but fails when encountering the characters. Why this is tricky for python is that numeric literals can contain non numeric literals like e for exponent, _ for delimiting, or x for hex and more…


I’m adding this check as an RFE

@hekuli Did some research on this and it already does error! What version are you using?

Hi @Ivan
Sorry, but I don’t remember the original version I used when reporting this.

I did however confirm that it does error on the latest version. So feel free to close this out.

1 Like