[Python-Dev] \u and \U escapes in raw unicode string literals
"Martin v. Löwis"
martin at v.loewis.de
Sat May 12 00:51:26 CEST 2007
> BTW, there's an easy work-around for this special case:
> os.stat(os.path.join(r"c:\windows\system32", "user32.dll"))
No matter what the decision is, there are always work-arounds.
The question is what language suits the users most. Being
able to specify characters by ordinal IMO has much less value
than the a consistent, concise definition of raw strings has.
> I think it's nice that you can use forward slashes on Windows -
> makes writing code that works in both worlds (Unix and Windows)
> a lot easier.
But, as Thomas says: you can't. You may be able to do so
when using the API directly, however, it fails if you
pass the file name in a command line of some tool that
takes /foo to mean a command line option "foo".
More information about the Python-Dev