facebook/tornado — pull request #506 by jjwchoy (2012-05-06 12:27:27+00:00)
Title: Modified linkify to accept a callable for extra_params. 

This allows you to specify different params for each link, for example to treat internal and external links differently.

example:

def extra_params_cb(url):
if url.startswith("http://example.com"):
return 'class="internal"'
else:
return 'class="external" rel="nofollow"'

linkify(some_text, extra_params=extra_params_cb)