diff options
author | Fred Drake <fdrake@acm.org> | 2001-02-19 14:57:02 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-02-19 14:57:02 (GMT) |
commit | b6a442539284448b052597a0733c7308ed8b1d01 (patch) | |
tree | 159dea2bf9fd0d05c71e2a54a56ef34699f5e0ee /Lib | |
parent | e09f63949dc67cc8d9d40bebc278a55ef6ac777c (diff) | |
download | cpython-b6a442539284448b052597a0733c7308ed8b1d01.zip cpython-b6a442539284448b052597a0733c7308ed8b1d01.tar.gz cpython-b6a442539284448b052597a0733c7308ed8b1d01.tar.bz2 |
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.)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/xml/dom/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/xml/dom/__init__.py b/Lib/xml/dom/__init__.py index 5eb15ae..2dbb695 100644 --- a/Lib/xml/dom/__init__.py +++ b/Lib/xml/dom/__init__.py @@ -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 |