def __init__(self, name=b'', type=A, cls=IN, ttl=0, payload=None,
                 auth=False):
        """
        @type name: L{bytes} or L{unicode}
        @param name: See L{RRHeader.name}

        @type type: L{int}
        @param type: The query type.

        @type cls: L{int}
        @param cls: The query class.

        @type ttl: L{int}
        @param ttl: Time to live for this record.  This will be
            converted to an L{int}.

        @type payload: An object implementing C{IEncodable}
        @param payload: A Query Type specific data object.

        @raises TypeError: if the ttl cannot be converted to an L{int}.
        @raises ValueError: if the ttl is negative.
        """
        assert (payload is None) or isinstance(payload, UnknownRecord) or (payload.TYPE == type)

        integralTTL = int(ttl)

        if integralTTL < 0:
            raise ValueError("TTL cannot be negative")

        self.name = Name(name)
        self.type = type
        self.cls = cls
        self.ttl = integralTTL
        self.payload = payload
        self.auth = auth

        @type name: L{bytes} or L{unicode}
        @param name: See L{RRHeader.name}

        @type type: L{int}
        @param type: The query type.

        @type cls: L{int}
        @param cls: The query class.

        @type ttl: L{int}
        @param ttl: Time to live for this record.  This will be
            converted to an L{int}.

        @type payload: An object implementing C{IEncodable}
        @param payload: A Query Type specific data object.

        @raises TypeError: if the ttl cannot be converted to an L{int}.
        @raises ValueError: if the ttl is negative.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/dns.py