mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
fixed indentation in several places
This commit is contained in:
parent
26a7983f08
commit
f9059ebede
1 changed files with 19 additions and 19 deletions
|
@ -6,13 +6,13 @@ should be based on this code. """
|
||||||
|
|
||||||
class XMLReader:
|
class XMLReader:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._cont_handler = handler.ContentHandler()
|
self._cont_handler = handler.ContentHandler()
|
||||||
#self._dtd_handler = handler.DTDHandler()
|
#self._dtd_handler = handler.DTDHandler()
|
||||||
#self._ent_handler = handler.EntityResolver()
|
#self._ent_handler = handler.EntityResolver()
|
||||||
self._err_handler = handler.ErrorHandler()
|
self._err_handler = handler.ErrorHandler()
|
||||||
|
|
||||||
def parse(self, source):
|
def parse(self, source):
|
||||||
"Parse an XML document from a system identifier or an InputSource."
|
"Parse an XML document from a system identifier or an InputSource."
|
||||||
raise NotImplementedError("This method must be implemented!")
|
raise NotImplementedError("This method must be implemented!")
|
||||||
|
|
||||||
def getContentHandler(self):
|
def getContentHandler(self):
|
||||||
|
@ -28,24 +28,24 @@ class XMLReader:
|
||||||
return self._dtd_handler
|
return self._dtd_handler
|
||||||
|
|
||||||
def setDTDHandler(self, handler):
|
def setDTDHandler(self, handler):
|
||||||
"Register an object to receive basic DTD-related events."
|
"Register an object to receive basic DTD-related events."
|
||||||
self._dtd_handler = handler
|
self._dtd_handler = handler
|
||||||
|
|
||||||
def getEntityResolver(self):
|
def getEntityResolver(self):
|
||||||
"Returns the current EntityResolver."
|
"Returns the current EntityResolver."
|
||||||
return self._ent_handler
|
return self._ent_handler
|
||||||
|
|
||||||
def setEntityResolver(self, resolver):
|
def setEntityResolver(self, resolver):
|
||||||
"Register an object to resolve external entities."
|
"Register an object to resolve external entities."
|
||||||
self._ent_handler = resolver
|
self._ent_handler = resolver
|
||||||
|
|
||||||
def getErrorHandler(self):
|
def getErrorHandler(self):
|
||||||
"Returns the current ErrorHandler."
|
"Returns the current ErrorHandler."
|
||||||
return self._err_handler
|
return self._err_handler
|
||||||
|
|
||||||
def setErrorHandler(self, handler):
|
def setErrorHandler(self, handler):
|
||||||
"Register an object to receive error-message events."
|
"Register an object to receive error-message events."
|
||||||
self._err_handler = handler
|
self._err_handler = handler
|
||||||
|
|
||||||
def setLocale(self, locale):
|
def setLocale(self, locale):
|
||||||
"""Allow an application to set the locale for errors and warnings.
|
"""Allow an application to set the locale for errors and warnings.
|
||||||
|
@ -149,20 +149,20 @@ class Locator:
|
||||||
results are unpredictable."""
|
results are unpredictable."""
|
||||||
|
|
||||||
def getColumnNumber(self):
|
def getColumnNumber(self):
|
||||||
"Return the column number where the current event ends."
|
"Return the column number where the current event ends."
|
||||||
return -1
|
return -1
|
||||||
|
|
||||||
def getLineNumber(self):
|
def getLineNumber(self):
|
||||||
"Return the line number where the current event ends."
|
"Return the line number where the current event ends."
|
||||||
return -1
|
return -1
|
||||||
|
|
||||||
def getPublicId(self):
|
def getPublicId(self):
|
||||||
"Return the public identifier for the current event."
|
"Return the public identifier for the current event."
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def getSystemId(self):
|
def getSystemId(self):
|
||||||
"Return the system identifier for the current event."
|
"Return the system identifier for the current event."
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# --- AttributesImpl
|
# --- AttributesImpl
|
||||||
class AttributesImpl:
|
class AttributesImpl:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue