Skip to content
Prev Previous commit
Next Next commit
bpo-40328: Remove unused class
  • Loading branch information
corona10 committed Apr 20, 2020
commit e357a08966dae1d1d789e694822edf029d463923
21 changes: 0 additions & 21 deletions Modules/cjkcodecs/tools/genmap_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,6 @@ def printout(self, fp):
def __len__(self):
return self.count

class UCMReader:
def __init__(self, fp):
self.file = fp

def itertokens(self):
isincharmap = False
for line in self.file:
body = line.split('#', 1)[0].strip()
if body == 'CHARMAP':
isincharmap = True
elif body == 'END CHARMAP':
isincharmap = False
elif isincharmap:
index, data = body.split(None, 1)
index = int(index[2:-1], 16)
data = self.parsedata(data)
yield index, data

def parsedata(self, data):
return eval('"'+data.split()[0]+'"')


class EncodeMapWriter:
filler_class = BufferedFiller
Expand Down