mirror of https://github.com/python/cpython
DOMException._get_code():
New method; this is the "alternate" access to the exception code. (Useful for Python DOM implementations that support the accessor method approach to retrieving attribute values.)
This commit is contained in:
parent
e09f63949d
commit
b6a4425392
|
@ -67,6 +67,9 @@ class DOMException(Exception):
|
|||
"DOMException should not be instantiated directly")
|
||||
apply(Exception.__init__, (self,) + args, kw)
|
||||
|
||||
def _get_code(self):
|
||||
return self.code
|
||||
|
||||
|
||||
class IndexSizeErr(DOMException):
|
||||
code = INDEX_SIZE_ERR
|
||||
|
|
Loading…
Reference in New Issue