def __init__(self,
                 offer,
                 requestNoContextTakeover=False,
                 noContextTakeover=None):
        if not isinstance(offer, PerMessageSnappyOffer):
            raise Exception("invalid type %s for offer" % type(offer))

        self.offer = offer

        if type(requestNoContextTakeover) != bool:
            raise Exception("invalid type %s for requestNoContextTakeover" % type(requestNoContextTakeover))

        if requestNoContextTakeover and not offer.acceptNoContextTakeover:
            raise Exception("invalid value %s for requestNoContextTakeover - feature unsupported by client" % requestNoContextTakeover)

        self.requestNoContextTakeover = requestNoContextTakeover

        if noContextTakeover is not None:
            if type(noContextTakeover) != bool:
                raise Exception("invalid type %s for noContextTakeover" % type(noContextTakeover))

            if offer.requestNoContextTakeover and not noContextTakeover:
                raise Exception("invalid value %s for noContextTakeover - client requested feature" % noContextTakeover)

        self.noContextTakeover = noContextTakeover
from_dict(d)
dataset/ETHPy150Open crossbario/autobahn-python/autobahn/websocket/compress_snappy.py/PerMessageSnappyOfferAccept.__init__--crossover with--dataset/ETHPy150Open roglew/pappy-proxy/pappyproxy/http.py/RepeatableDict.from_dict