Re: [Python-Dev] [Python-checkins] r87458 - python/branches/py3k/Lib/gettext.py

2010-12-23 Thread Benjamin Peterson
2010/12/23 "Martin v. Löwis" : >>      # "a?b:c" to "test(a,b,c)". >>      expr = re.compile(r'(.*?)\?(.*?):(.*)') >>      def repl(x): >> -        return "test(%s, %s, %s)" % (x.group(1), x.group(2), >> -                                     expr.sub(repl, x.group(3))) >> +        return "(%s if %s

Re: [Python-Dev] [Python-checkins] r87458 - python/branches/py3k/Lib/gettext.py

2010-12-23 Thread Martin v. Löwis
> # "a?b:c" to "test(a,b,c)". > expr = re.compile(r'(.*?)\?(.*?):(.*)') > def repl(x): > -return "test(%s, %s, %s)" % (x.group(1), x.group(2), > - expr.sub(repl, x.group(3))) > +return "(%s if %s else %s)" % (x.group(2), x.group(1),