3 ms·
Having print as a function is actually useful if you want to use it like any other function, e.g. `def whatever(x, y, z, , output=print):` then you could use th
by nick238 4y ago
Having print as a function is actually useful if you want to use it like any other function, e.g. `def whatever(x, y, z, , output=print):` then you could use the default or put in whatever that's like `print`.
I also don't get what you mean by "dumb byte strings", it's just that the default* string type, i.e. when you have a literal `"foo"` in source, it's a sequence of codepoints vs. a sequence of octets. Assuming file systems use UTF-8 was broken in very early 3.x (I think before 3.3?) but it's something I've never struggled with (pure ASCII filenames for me). Forcing the programmer to know if they're dealing with characters & code points vs. bytes/structs/network buffers is a good thing, IMHO.