diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-30 01:19:48 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-30 01:19:48 (GMT) |
commit | ce36ad8a467d914eb5c91f33835b9eaea18ee93b (patch) | |
tree | 05bf654f3359e20b455dc300bd860bba5d291c8d /Lib/gettext.py | |
parent | 8b3febef2f96c35e9aad9db2ef499db040fdefae (diff) | |
download | cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.zip cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.gz cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.bz2 |
Raise statement normalization in Lib/.
Diffstat (limited to 'Lib/gettext.py')
-rw-r--r-- | Lib/gettext.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/gettext.py b/Lib/gettext.py index 37ebf8a..533be3d 100644 --- a/Lib/gettext.py +++ b/Lib/gettext.py @@ -83,11 +83,10 @@ def c2py(plural): try: danger = [x for x in tokens if x[0] == token.NAME and x[1] != 'n'] except tokenize.TokenError: - raise ValueError, \ - 'plural forms expression error, maybe unbalanced parenthesis' + raise ValueError('plural forms expression error, maybe unbalanced parenthesis') else: if danger: - raise ValueError, 'plural forms expression could be dangerous' + raise ValueError('plural forms expression could be dangerous') # Replace some C operators by their Python equivalents plural = plural.replace('&&', ' and ') @@ -113,7 +112,7 @@ def c2py(plural): # Actually, we never reach this code, because unbalanced # parentheses get caught in the security check at the # beginning. - raise ValueError, 'unbalanced parenthesis in plural form' + raise ValueError('unbalanced parenthesis in plural form') s = expr.sub(repl, stack.pop()) stack[-1] += '(%s)' % s else: |