I knew you can use keywords as names here but am not quite sure about this. Positional arguments (against my expectations from keyword arguments) don't allow any of these three versions. Should they also work? I think it would be nice if they behave the same for keyword identifiers at least.
While you are able to create local variables that look like keywords with binding.local_variable_set, the same is not true for identifiers that look like constants or globals.
You can however try to pass a keyword that looks like a constant to a function and the error message there will only be that the keyword is unknown. Trying to pass a global keyword is a generic syntax error:
I knew you can use keywords as names here but am not quite sure about this. Positional arguments (against my expectations from keyword arguments) don't allow any of these three versions. Should they also work?
The reason why keywords can be used in names is expressiveness on the caller site (not relevant to positional argument), like