[Python-3000] Raw strings containing \u or \U (original) (raw)
Guido van Rossum guido at python.org
Wed May 16 17:46:13 CEST 2007
- Previous message: [Python-3000] Alternatives for __del__
- Next message: [Python-3000] Raw strings containing \u or \U
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Walter Doerwald, in private mail, reminded me of a third use case for raw strings: docstrings containing example code using backslashes. Here it really seems wrong to interpolate \u and \U.
So this is swaying me towards changing this behavior: r"\u1234" will be a string of length 6, and r"\U00012345" one of length 10.
I'm still on the fence about the trailing backslash; I personally prefer to write Windows paths using regular strings and doubled backslashes.
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-3000] Alternatives for __del__
- Next message: [Python-3000] Raw strings containing \u or \U
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]