mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
r698@Silves: collinwinter | 2007-08-24 10:57:15 -0700
Normalize raise statements in Lib/xml/.
This commit is contained in:
parent
75d38e992e
commit
70e79803fc
4 changed files with 14 additions and 14 deletions
|
@ -295,12 +295,12 @@ class AttributesImpl:
|
|||
|
||||
def getNameByQName(self, name):
|
||||
if name not in self._attrs:
|
||||
raise KeyError, name
|
||||
raise KeyError(name)
|
||||
return name
|
||||
|
||||
def getQNameByName(self, name):
|
||||
if name not in self._attrs:
|
||||
raise KeyError, name
|
||||
raise KeyError(name)
|
||||
return name
|
||||
|
||||
def getNames(self):
|
||||
|
@ -350,14 +350,14 @@ class AttributesNSImpl(AttributesImpl):
|
|||
if qname == name:
|
||||
return self._attrs[nsname]
|
||||
|
||||
raise KeyError, name
|
||||
raise KeyError(name)
|
||||
|
||||
def getNameByQName(self, name):
|
||||
for (nsname, qname) in self._qnames.items():
|
||||
if qname == name:
|
||||
return nsname
|
||||
|
||||
raise KeyError, name
|
||||
raise KeyError(name)
|
||||
|
||||
def getQNameByName(self, name):
|
||||
return self._qnames[name]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue