Re: [Python-ideas] Make non-meaningful backslashes illegal in string literals

On Fri, Aug 7, 2015, at 23:45, Steven D'Aprano wrote:
I challenge you to find *one* use in the wild. Just one.
I'll take that challenge. Here are SEVEN uses for \v in the real world
I should have better defined what I meant by "use". It has to be A) The actual \v escape, actually used, in a string literal in source code. I was asking for real-world uses of _the escape_. I'd guess about half of the ones you named actually are embodied in source code in a C-derived language somewhere - but probably not in Python. B) For the actual vertical tab function, rather than some other purpose the byte is being repurposed for. For other functions, the \v spelling obfuscates rather than illuminating. C) Code merely used for parsing string literal formats that themselves define \v, naturally, don't count. Mentioned for completeness, since otherwise these would technically satisfy the other two while accomplishing nothing useful. The vertical tab function is clearly defined as moving the cursor down (or the paper up) one or more lines to a predetermined position - e.g. a multiple of six lines, just as a tab conventionally takes you to the next multiple of eight columns, or a position that has been programmed into the device by use of other control mechanisms: VT - LINE TABULATION Notation: (C0) Representation: 00/11 VT causes the active presentation position to be moved in the presentation component to the corresponding character position on the line at which the following line tabulation stop is set.
participants (1)
-
random832@fastmail.us