Once we're done with the sys module, remove it from the namespace so

this module is "import *" safe.
This commit is contained in:
Fred Drake 2000-09-18 16:22:30 +00:00
parent 691270feee
commit c40cdf7238
1 changed files with 11 additions and 13 deletions

View File

@ -2,6 +2,7 @@
import sys import sys
if sys.platform[:4] == "java": if sys.platform[:4] == "java":
from java.lang import Exception from java.lang import Exception
del sys
# ===== SAXEXCEPTION ===== # ===== SAXEXCEPTION =====
@ -15,7 +16,7 @@ class SAXException(Exception):
the exception; instead, you can simply read the information in the exception; instead, you can simply read the information in
it.""" it."""
def __init__(self, msg, exception = None): def __init__(self, msg, exception=None):
"""Creates an exception. The message is required, but the exception """Creates an exception. The message is required, but the exception
is optional.""" is optional."""
self._msg = msg self._msg = msg
@ -103,6 +104,3 @@ class SAXNotSupportedException(SAXException):
perform is requested (specifically setting a state or value). SAX perform is requested (specifically setting a state or value). SAX
applications and extensions may use this class for similar applications and extensions may use this class for similar
purposes.""" purposes."""