Changeset 70 for pycodebattler
- Timestamp:
- 12/22/10 21:35:37 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pycodebattler/trunk/pycodebattler/score.py
r56 r70 25 25 26 26 class Scorer: 27 def __init__(self, lines ):27 def __init__(self, lines, compress_level=9): 28 28 self._code = ''.join(lines) 29 self._ccode = _compseq(lines, 9)29 self._ccode = _compseq(lines, compress_level) 30 30 self._lines = lines 31 31 self._nlines = [l for l in lines … … 62 62 return len(self.uncommented_lines()) or 1 63 63 64 def compressibility(self , level=6):64 def compressibility(self): 65 65 return float(len(self._ccode)) / self.bytes() 66 66
Note: See TracChangeset
for help on using the changeset viewer.