Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naming convention violation (1) #353

Open
HolQue opened this issue Oct 24, 2024 · 2 comments
Open

Naming convention violation (1) #353

HolQue opened this issue Oct 24, 2024 · 2 comments
Labels

Comments

@HolQue
Copy link
Collaborator

HolQue commented Oct 24, 2024

The naming convention tells: Key names have to start with a letter, digit or underscore.

Therefore this name is invalid:

"$A" : 1

Result:

'Invalid key name: "$A". Key names have to start with a letter, digit or underscore.'

But this is accepted:

"$A:" : 1

Result:

DotDict({'$A:': 1})

Why does the colon at the end of the key name makes a difference here?

In both cases the name starts with a character that is not a letter, not a digit and not an underscore. Therefore both names are invalid.

@HolQue
Copy link
Collaborator Author

HolQue commented Oct 28, 2024

Because the name is accepted, I try to use this name:

"$A:" : 1,
"p01" : ${$A:}

This causes an aftereffect:

Error: 'local variable 'tmpList03' referenced before assignment'!

@HolQue
Copy link
Collaborator Author

HolQue commented Oct 28, 2024

Also colons only are accepted as key name:

":::" : 1

But should not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants