Skip to content

[ 2686538] Python inline code at left-hand side of the colon #472

@HolQue

Description

@HolQue

A lot of things can go wrong with Python inline code. The following examples, for instance, all cause different error messages. And each of the error messages is correct.

"<<[1, 2]>>" : 1
<<1 if True else 2>> : 1
${<<1 if True else 2>>} : "B"
${<<1 if ${A} else 2>>} : "B"
${A}[<<0 if True else 1>>] : 4

But in the examples above, all expressions with Python inline code are located on the left-hand side of the colon. And the question is: Do we have any valid use case for Python inline code on the left-hand side of the colon? I do not see one.

In my opinion the error handling for expressions on the left-hand side of the colon can be shortened by the following rule:

Python inline code on the left-hand side of the colon is generally not allowed.

All further details (e.g. not allowed within strings) are irrelevant and misleading in this case.

Metadata

Metadata

Assignees

Projects

Status

Open

Relationships

None yet

Development

No branches or pull requests

Issue actions