'Parses all the parts of the URL string to a dictionary.
URL format: protocal://username:password@domain:port/path/page?querystring#anchor
For example: http://user:pass@example.com:992/animal/bird?species=seagull&q#wings
This is a cached method that is only invoked when necessary, and only once.'

def _parse(self):

    p = urlparse.urlsplit(self._string)
    P = {PROTOCOL: p[0], USERNAME: u'', PASSWORD: u'', DOMAIN: p[1], PORT: u'', PATH: p[2], PAGE: u'', QUERY: urldecode(p[3]), ANCHOR: p[4]}
    if ('@' in P[DOMAIN]):
        (P[USERNAME], P[PASSWORD]) = (p[1].split('@')[0].split(':') + [u''])[:2]
        P[DOMAIN] = p[1].split('@')[1]
    if (':' in P[DOMAIN]):
        (P[DOMAIN], P[PORT]) = P[DOMAIN].split(':')
        P[PORT] = ((P[PORT].isdigit() and int(P[PORT])) or P[PORT])
    if ('/' in P[PATH]):
        P[PAGE] = p[2].split('/')[(-1)]
        P[PATH] = p[2][:(len(p[2]) - len(P[PAGE]))].strip('/').split('/')
        P[PATH] = filter((lambda v: (v != '')), P[PATH])
    else:
        P[PAGE] = p[2].strip('/')
        P[PATH] = []
    self.__dict__['_parts'] = P
