def __init__(self, name=b''):
        """
        @param name: A name.
        @type name: L{unicode} or L{bytes}
        """
        if isinstance(name, unicode):
            name = name.encode('idna')
        if not isinstance(name, bytes):
            raise TypeError("%r is not a byte string" % (name,))
        self.name = name

        @param name: A name.
        @type name: L{unicode} or L{bytes}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/dns.py