On Mon, May 27, 2013 at 1:41 PM, Göktuğ Kayaalp <goktug.kayaalp@gmail.com> wrote:
I think it would add some significant flexibility to Python to let users
define custom string prefixes. What I mean by a string prefix is,
a letter prefixing the string literal, modifying the behavior of it,
[...]

The feature isn't present. But it isn't really clear what you want either. The current string prefixes are not dynamically analyzed. Do you want static hooks for the lexer? A string method to register new prefixes? Do you want to specify new string prefixes in the existing framework?

I think string prefixes aren't something that we want more of, this is already complicated enough:
"b" | "B" | "br" | "Br" | "bR" | "BR" | "rb" | "rB" | "Rb" | "RB"
"r" | "u" | "R" | "U"

We should be more creative on how to get rid of them.

Yuval Greenfield