summaryrefslogtreecommitdiffstats
path: root/Lib/xml/dom
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-02-19 14:57:02 (GMT)
committerFred Drake <fdrake@acm.org>2001-02-19 14:57:02 (GMT)
commitb6a442539284448b052597a0733c7308ed8b1d01 (patch)
tree159dea2bf9fd0d05c71e2a54a56ef34699f5e0ee /Lib/xml/dom
parente09f63949dc67cc8d9d40bebc278a55ef6ac777c (diff)
downloadcpython-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/xml/dom')
-rw-r--r--Lib/xml/dom/__init__.py3
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