3 ms·
Very unfair comparison. Python has: * three string syntaxes (regular, formatted, and raw) plus byte arrays. * single vs double quotes, which are insignifican
by kdmccormick 3y ago
Very unfair comparison. Python has:
* three string syntaxes (regular, formatted, and raw) plus byte arrays.
* single vs double quotes, which are insignificant, other than that you don't need to escape the containing literal quote type.
* inline vs multiline.
These all compose in a predictable way.
If you want to be a jerk, you can multiply 4 * 2 * 2 and say "ZOMG 16 string types!!", but that's about as fair as saying that having positive/negative, octal/hex/dec, int/float, and standard/scientific means that a language has 24 numerical types.
- Spivak 3y agoYou also forgot implicitly concatenated strings. "hello" "world" blah = ( "line" "line" ) They are actually really useful when you want multi-line formatted strings without indentation and had to be made official when people wanted to take them away. > If you want to be a jerk, you can multiply 4 * 2 * 2 and say "ZOMG 16 string types!!" And now you understand how they calculated the number of string types in YAML.