Completed
Push — master ( f73e69...91b7c0 )
by Raphael
01:35
created

LineIterator   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 7
Duplicated Lines 0 %
Metric Value
dl 0
loc 7
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __iter__() 0 2 2
A __init__() 0 2 1
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
4
class LineIterator(object):
5
6
    def __init__(self, path):
7
        self._path = path
8
9
    def __iter__(self):
10
        return (line.strip() for line in open(self._path).xreadlines())