On Jul 4, 7:15 am, Matthieu TC <[EMAIL PROTECTED]> wrote:
> May I suggest giving the possibility to use any delimiter for a raw string?  
> just like in Vi or ruby.
>
> Vi:
>  %s_a_b_g  is valid and so is  %s/a/b/g
>
> Ruby:
>  %q{dj'\ks'a\'"}   or %q-dj'\ks'a\'"-
>
> So as long as your regex does not use all the valid characters, readability 
> is maintained.

first, you'll need a way to flag that something is an arbitrarily
quoted string; 'r' is taken, so let's use 'q'.  next, you need to
distinguish strings from variables, perhaps by adding a flag to all
variables; $ should do nicely and has some historical precident.  once
you've done all that, you can write something like this:
  $q = q|this so-called "string" doesn't use conventional quotes|

congratulations!  you've just invented perl!

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to