mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +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
|
@ -127,8 +127,8 @@ class DictMixin:
|
|||
return default
|
||||
def pop(self, key, *args):
|
||||
if len(args) > 1:
|
||||
raise TypeError, "pop expected at most 2 arguments, got "\
|
||||
+ repr(1 + len(args))
|
||||
raise TypeError("pop expected at most 2 arguments, got "
|
||||
+ repr(1 + len(args)))
|
||||
try:
|
||||
value = self[key]
|
||||
except KeyError:
|
||||
|
@ -141,7 +141,7 @@ class DictMixin:
|
|||
try:
|
||||
k, v = next(self.iteritems())
|
||||
except StopIteration:
|
||||
raise KeyError, 'container is empty'
|
||||
raise KeyError('container is empty')
|
||||
del self[k]
|
||||
return (k, v)
|
||||
def update(self, other=None, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue