Fix printing for Operand object
- Dominant language
- Python
- Stars
- 4
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
When an `Operand` object is printed, if the name contains quotation marks, those marks are not printed (e.g. `"hello"` creates `Operand("hello")` which, when printed, appears as `hello`). This becomes a problem when the empty string (`""`) shows up as an operand, as nothing is printed. When such an operand (`Operand("")`) is contained as part of another object, such as `CommandInvocationInitial`, it will appear as though, when printed, the `CommandInvocationInitial` object does not actually contain an `Operand("")` when, in reality, it does. This is quite deceptive and could easily lead to annoying issues that are difficult to debug (in this case, the only way to tell that there is an `Operand("")` is to check the length of the `CommandInvocationInitial` object's operand list, which is not intuitive). My proposition would be to forcefully include quotation marks around every operand that is printed to ensure that it is always clear that they exist or to provide some clear indicator that any `Operand("")` instances are present such as some kind of keyword.
See #19 for more details on the issue.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.