I agree.  The trouble here is that the variable 'url' is a misnomer in this case.  We aren't actually manipulating an entire url string that includes the protocol, netloc, path, and all the other parameters that urlparse determines.  The url looks something like this '/accounts/1/lists/1'.  As awesome as urlparse is, using it here only returns the equivalent path string which has to use the split method to tokenize the string with the '/' delimiter (i.e. url_parts = url.split('/')).  I will try a different string manipulation method that hopefully, will be easier to follow.   What is even more confusing is that the string manipulation will change depending on whether the host class is an entry or a collection.  I found away to place this in the base class, by adding a parameter to acknowledge the different class.