summaryrefslogtreecommitdiff
path: root/Lib/gettext.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 +0000
committerCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 +0000
commitce36ad8a467d914eb5c91f33835b9eaea18ee93b (patch)
tree05bf654f3359e20b455dc300bd860bba5d291c8d /Lib/gettext.py
parent8b3febef2f96c35e9aad9db2ef499db040fdefae (diff)
downloadcpython-git-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.gz
Raise statement normalization in Lib/.
Diffstat (limited to 'Lib/gettext.py')
-rw-r--r--Lib/gettext.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/gettext.py b/Lib/gettext.py
index 37ebf8a82b..533be3dbac 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: