summaryrefslogtreecommitdiff
path: root/coverage/parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/parser.py')
-rw-r--r--coverage/parser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/coverage/parser.py b/coverage/parser.py
index 2663baca..0873e7af 100644
--- a/coverage/parser.py
+++ b/coverage/parser.py
@@ -65,13 +65,13 @@ class CodeParser(object):
# Lazily-created ByteParser
self._byte_parser = None
- def _get_byte_parser(self):
+ @property
+ def byte_parser(self):
"""Create a ByteParser on demand."""
if not self._byte_parser:
self._byte_parser = \
ByteParser(text=self.text, filename=self.filename)
return self._byte_parser
- byte_parser = property(_get_byte_parser)
def lines_matching(self, *regexes):
"""Find the lines matching one of a list of regexes.