is `basestring = basestring` really necessary? Seems like you could ditch the `else` clause.