You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defgetChar(idx, charTbl=asciiTbl, continuousOrder=True):# continuousOrder means that distance between each two neighbour's numerical values is exactly 1
else:# xrange - extended virtual charset used for memory/space optimization
194
194
charTbl=xrange(charTbl[position], charTbl[-1] +1)
195
195
else:
196
196
maxValue=posValue
197
197
198
198
iftype(charTbl) !=xrange:
199
199
charTbl=charTbl[:position]
200
-
else:
200
+
else:# xrange - extended set (e.g. Unicode)
201
201
charTbl=xrange(charTbl[0], charTbl[position])
202
202
203
203
iflen(charTbl) ==1:
204
204
ifcontinuousOrder:
205
205
ifmaxValue==1:
206
206
returnNone
207
-
elifminValue==maxChar:
207
+
elifminValue==maxChar:# if we hit the maxChar then extend the working set with xrange (virtual charset used because of memory/space optimization) and continue tests with new set
forretValin (originalTbl[originalTbl.index(minValue)], originalTbl[originalTbl.index(minValue) +1]):# if we are working with non-continuous set both minValue and character afterwards are possible candidates
0 commit comments