From 86cd0f2e083eef45f749f2e92f9d4643408e27d0 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 6 Mar 2014 20:21:20 -0800 Subject: [PATCH] irkerd: Use self instead of LineBufferedStream in lines() That's what 'self' is for ;). Also prefix 'crlf_re' with an underscore to mark it as private data, and not part of LineBufferedStream's API. --- irkerd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/irkerd b/irkerd index fcf7fab..3b30a20 100755 --- a/irkerd +++ b/irkerd @@ -185,7 +185,7 @@ class IRCClient(): class LineBufferedStream(): "Line-buffer a read stream." - crlf_re = re.compile(b'\r?\n') + _crlf_re = re.compile(b'\r?\n') def __init__(self): self.buffer = '' @@ -195,7 +195,7 @@ class LineBufferedStream(): def lines(self): "Iterate over lines in the buffer." - lines = LineBufferedStream.crlf_re.split(self.buffer) + lines = self._crlf_re.split(self.buffer) self.buffer = lines.pop() return iter(lines) -- 2.26.2