On 2013-09-19, at 23:45 , Kevin Ballard wrote: > Yes I know, but in my (rather limited) experience with Python, triple-quoted > strings are typically used for docstrings. It was just an example anyway.
They're also commonly used for multiline strings as single-quoted strings don't require it. > >> * The quote-escaping oddness is less of an issue in Python as you can >> also use single-quotes for delimiting, or use triple-quoted strings >> (if you need to embed both single and double quotes in rawstrings). > > If I need to embed both ''' and """ in a string, I'm out of luck. The chance of that is as remote as can be. I've never seen or heard of it happen. And mind, the issue must happen *in a rawstring* which is even more unlikely. >> Also, >> >>> windows file paths >> >> windows paths can also use forward slashes so that's not a very >> interesting justification. > > Not always. UNC paths must start with \\ (in my testing, //foo/bar/baz is not > interpreted as a UNC path by the Windows File Explorer, but \\foo/bar/baz is). True. Do you expect writing literal UNC paths in Rust to be a common occurrence? > There's also paths that start with the verbatim prefix \\?\, which disables > interpretation of forward-slashes (among other things). That's not really relevant to a rawstrings proposal, why would a developer embed such a path literally? > As I am actively engaged in writing a replacement for the path module, and am > currently expanding the test suite for Windows paths, raw strings would be > extremely useful to me. I'd have thought it a better idea to use path builders (maybe macros) and avoid embedding literal path separators in order to avoid portability issues. _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev