2 more complete sections and 2 more partial sections in case-study

This commit is contained in:
Mark Pilgrim
2009-03-11 22:36:23 -04:00
parent c8080fdbd1
commit 5ead1cfa01
47 changed files with 668 additions and 446 deletions
+6 -4
View File
@@ -10,11 +10,9 @@
import sys
* test.py: change file() to open()
* universaldetector.py: change r'' strings to b'' byte arrays in self._highBitDetector, self._escDetector regular expressions
- charsetprober.py: change regular expression-based replace to use b'' byte arrays instead of strings
- universaldetector.py: change self._mLastChar from a r'' string to a b'' byte array
- mbcharsetprober.py: change self._mLastChar from a list of two 1-character strings to a list of two ints
- universaldetector.py: getting a single element from a byte array yields an integer, not a byte, so change syntax to make sure we self._mLastChar is always a byte
* universaldetector.py: change self._mLastChar from a '' string to a b'' byte array
* universaldetector.py: getting a single element from a byte array yields an integer, not a byte, so change syntax to make sure we self._mLastChar is always a byte
old:
self._mLastChar = aBuf[-1]
new:
@@ -25,4 +23,8 @@
- jpcntx.py, chardistribution.py (editorial): global search-and-replace "aStr" --> "aBuf" to make it clear that we're passing around a byte array
- sbcharsetprober.py, latin1prober.py: change ord(c) to c since it's already an int (iterating through a byte array)
- (not sure where this fits) mbcharsetprober.py: change self._mLastChar from a list of two 1-character strings to a list of two ints
- (not sure where this fits) charsetprober.py: change regular expression-based replace to use b'' byte arrays instead of strings
- latin1prober.py: refactor reduce(operator.add, ...) to use a for loop instead