3 ms·
The plus operator is traditionally expected to be symmetrical, i.e. a + b == b + a. The division operator, on the other hand, is not: a / b != b / a. The fact t
by BerislavLopac 8y ago
The plus operator is traditionally expected to be symmetrical, i.e. a + b == b + a. The division operator, on the other hand, is not: a / b != b / a. The fact that a slash is used as a separator in paths is only a welcome coincidence.
- glandium 8y agoIn the context of strings, that's not true, and very commonly accepted: "a" + "b" == "ab" "b" + "a" == "ba"
- BerislavLopac 8y agoUsing + for string concatenation was an error introduced early in Python's design, and is to difficult to repair now.