[Python-Dev] [Python-checkins] r87458 - python/branches/py3k/Lib/gettext.py (original) (raw)
Benjamin Peterson benjamin at python.org
Fri Dec 24 00:45:41 CET 2010
- Previous message: [Python-Dev] [Python-checkins] r87458 - python/branches/py3k/Lib/gettext.py
- Next message: [Python-Dev] [Python-checkins] r87445 - python/branches/py3k/Lib/numbers.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2010/12/23 "Martin v. Löwis" <martin at v.loewis.de>:
# "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.
Done.
-- Regards, Benjamin
- Previous message: [Python-Dev] [Python-checkins] r87458 - python/branches/py3k/Lib/gettext.py
- Next message: [Python-Dev] [Python-checkins] r87445 - python/branches/py3k/Lib/numbers.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]