mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Raise statement normalization in Lib/.
This commit is contained in:
parent
8b3febef2f
commit
ce36ad8a46
80 changed files with 502 additions and 530 deletions
|
@ -62,7 +62,7 @@ def _reduce_ex(self, proto):
|
|||
state = None
|
||||
else:
|
||||
if base is self.__class__:
|
||||
raise TypeError, "can't pickle %s objects" % base.__name__
|
||||
raise TypeError("can't pickle %s objects" % base.__name__)
|
||||
state = base(self)
|
||||
args = (self.__class__, base, state)
|
||||
try:
|
||||
|
@ -153,7 +153,7 @@ def add_extension(module, name, code):
|
|||
"""Register an extension code."""
|
||||
code = int(code)
|
||||
if not 1 <= code <= 0x7fffffff:
|
||||
raise ValueError, "code out of range"
|
||||
raise ValueError("code out of range")
|
||||
key = (module, name)
|
||||
if (_extension_registry.get(key) == code and
|
||||
_inverted_registry.get(code) == key):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue