def _splituser(host):
    """splituser('user[:passwd]@host[:port]')
    --> 'user[:passwd]', 'host[:port]'."""
    user, delim, host = host.rpartition('@')
    return (user if delim else None), host
splituser('user[:passwd]@host[:port]')
    --> 'user[:passwd]', 'host[:port]'.
product/gradle-plugin/src/main/python/setuptools/package_index.py