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:
Fred Drake 2001-02-19 14:57:02 +00:00
parent e09f63949d
commit b6a4425392
1 changed files with 3 additions and 0 deletions

View File

@ -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