mirror of https://github.com/jesopo/irctokens
add some object copy methods to Line
This commit is contained in:
parent
cc97234011
commit
554d9a25f5
|
@ -58,3 +58,10 @@ class Line(object):
|
|||
|
||||
def format(self) -> str:
|
||||
return self._format(self)
|
||||
|
||||
def with_source(self, source: str) -> "Line":
|
||||
return Line(self.tags, source, self.command, self.params, self._format)
|
||||
def copy(self) -> "Line":
|
||||
return Line(self.tags, self.source, self.command, self.params,
|
||||
self._format)
|
||||
|
||||
|
|
Loading…
Reference in New Issue