for consistency you could change ``str`` to ``unicode`` here.