3 ms·
Good point about the old syntax putting the file at the start rather than the end, but if you have a lot of code like that you could just do this: p = partia
by ptx 7y ago
Good point about the old syntax putting the file at the start rather than the end, but if you have a lot of code like that you could just do this:
p = partial(print, file=fp)
p("foo")
p("bar")
- daeken 7y agoUnfortunately, that only solves the case of printing strings with newlines, not the case where I might want to continue the line with a space instead, where I'd normally just add "," at the end and call it good. There are absolutely ways around their poor decision, but at the end of the day, the print function instead of statement is a bad fit for some use cases.