mirror of
https://github.com/python/cpython
synced 2026-09-29 10:35:30 +03:00
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
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue