Return the decoded userinfo, host and port subcomponents of the URI
        authority as a three-item tuple.

def getauthority(self, default=None, encoding='utf-8', errors='strict'):
        """Return the decoded userinfo, host and port subcomponents of the URI
        authority as a three-item tuple.

        """
        # TBD: (userinfo, host, port) kwargs, default string?
        if default is None:
            default = (None, None, None)
        elif not isinstance(default, collections.Iterable):
            raise TypeError('Invalid default type')
        elif len(default) != 3:
            raise ValueError('Invalid default length')
        # TODO: this could be much more efficient by using a dedicated regex
        return (
            self.getuserinfo(default[0], encoding, errors),
            self.gethost(default[1], errors),
            self.getport(default[2])
        )