A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-December/106987.html below:

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

[Python-Dev] [Python-checkins] r87458 - python/branches/py3k/Lib/gettext.py"Martin v. Löwis" martin at v.loewis.de
Fri Dec 24 00:39:02 CET 2010
>      # "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),
> +                                       expr.sub(repl, x.group(3)))

Please update the comment as well.

Regards,
Martin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4