On Tue, Aug 5, 2008 at 10:05 AM, Robert Dailey <[EMAIL PROTECTED]> wrote:
> Hi, > > I've created a function to normalize Subversion URLs, however when I return > a string, printing the result of the function becomes "None". When I print > the value of the string before I return from the function, I see a valid > string. What's going on? The function is below: > > > def normurl( url_root, url ): > mutableurl = url[len(url_root):] > > split1 = mutableurl.split( "..", 1 ) > if len(split1) == 1: > print "Returning:", split1[0] > return split1[0] > > split2 = split1[0][:-1].rsplit( "/", 1 ) > combined = split2[0] + split1[1] > normurl( url_root, url_root + combined ) > Bah, never mind. I just figured it out. I needed a 'return' before my recursive normurl() call. Sorry for the wasted post!
-- http://mail.python.org/mailman/listinfo/python-list