I've seen these in documentation, namely in the "importlib" documentation for Python 3.1, and I'm wondering what the difference is between a "universal newline" and a "standard newline", if any.
I know it has to do with the byte sequence that is used to represent newlines, and I think universal newlines are simply a single linefeed byte, but I'm not sure about standard newlines. Are they simply the form the host machine uses?
I did learn that the exec function will only take source that uses '\n' to represent newlines.
I also learned that byte data (and string data) has a replace method that can replace each instance of a byte sequence (or string) with another byte sequence (or string).
Your information led me to realize that you can't manually replace all instances of a specific byte sequence, because different operating systems use different byte sequences to represent newlines. Is there a variable defined in a module that represents the system's newline bytes?
I understand that the "\r\n" or "\n\r" combination goes back to the old mechanical printers where you had to feed the paper up one line and set the carriage to the beginning margin. I guess this was the standard then.