diff options
| author | Stefan Behnel <scoder@users.berlios.de> | 2011-03-14 11:27:32 +0100 |
|---|---|---|
| committer | Stefan Behnel <scoder@users.berlios.de> | 2011-03-14 11:27:32 +0100 |
| commit | b8b3b7416fc50cee6aabf4f0d7737bec6b92eac3 (patch) | |
| tree | d006b97cc8418c6421008daf6ed4baf76c79987b /src | |
| parent | 5fc8504e7d76952d07938349482a3a2e99492c0a (diff) | |
| download | python-lxml-b8b3b7416fc50cee6aabf4f0d7737bec6b92eac3.tar.gz | |
slight code simplification in error log handling
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/lxml/xmlerror.pxi | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lxml/xmlerror.pxi b/src/lxml/xmlerror.pxi index ff3d6308..f0ff36b3 100644 --- a/src/lxml/xmlerror.pxi +++ b/src/lxml/xmlerror.pxi @@ -127,7 +127,7 @@ cdef class _BaseErrorLog: self._first_error = first_error self.last_error = last_error - def copy(self): + cpdef copy(self): return _BaseErrorLog(self._first_error, self.last_error) def __repr__(self): @@ -218,7 +218,7 @@ cdef class _ListErrorLog(_BaseErrorLog): _BaseErrorLog.__init__(self, first_error, last_error) self._entries = entries - def copy(self): + cpdef copy(self): u"""Creates a shallow copy of this error log. Reuses the list of entries. """ @@ -342,7 +342,7 @@ cdef class _ErrorLog(_ListErrorLog): self._first_error = None del self._entries[:] - def copy(self): + cpdef copy(self): u"""Creates a shallow copy of this error log and the list of entries. """ return _ListErrorLog(self._entries[:], self._first_error, @@ -415,7 +415,7 @@ cdef class PyErrorLog(_BaseErrorLog): logger = logging.getLogger() self._log = logger.log - def copy(self): + cpdef copy(self): u"""Dummy method that returns an empty error log. """ return _ListErrorLog([], None, None) |
