What do you think about just taking a **kwargs argument in lieu of href, href_text? That way, the caller can use the other fields at their discretion (e.g., 'code').