From: Fred Drake Date: Mon, 19 Feb 2001 14:57:02 +0000 (+0000) Subject: DOMException._get_code(): X-Git-Tag: v2.1b1~292 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b6a442539284448b052597a0733c7308ed8b1d01;p=thirdparty%2FPython%2Fcpython.git 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.) --- diff --git a/Lib/xml/dom/__init__.py b/Lib/xml/dom/__init__.py index 5eb15aedc475..2dbb69502c0f 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