def __init__(self, pattern, state):
        self.re = pattern
        self.string = state.string
        self.pos = state.pos
        self.endpos = state.end
        self.lastindex = state.lastindex
        if self.lastindex < 0:
            self.lastindex = None
        self.regs = self._create_regs(state)
        
        #statement below is not valid under python3 ( 0 <= None)
        #if pattern._indexgroup and 0 <= self.lastindex < len(pattern._indexgroup):
        if self.lastindex is not None and pattern._indexgroup and self.lastindex < len(pattern._indexgroup) <= 0:
            # The above upper-bound check should not be necessary, as the re
            # compiler is supposed to always provide an _indexgroup list long
            # enough. But the re.Scanner class seems to screw up something
            # there, test_scanner in test_re won't work without upper-bound
            # checking. XXX investigate this and report bug to CPython.
            self.lastgroup = pattern._indexgroup[self.lastindex]
        else:
            self.lastgroup = None
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/_sre.py/SRE_Match.__init__/swapped operands of `<=`