def __new__(cls, id, start, end, lnk=None, paths=(1,), form=None, surface=None, ipos=0, lrules=("null",), pos=()): if form is None: raise TypeError('Missing required keyword argument \'form\'.') if lnk is None: lnk = Lnk.default() return super(YYToken, cls).__new__( cls, id, start, end, lnk, list(paths), form, surface, ipos, list(lrules), list(pos) )
def testDefault(self): lnk = Lnk.default() assert lnk.type == Lnk.UNSPECIFIED assert str(lnk) == '' repr(lnk) # no error