def fixup_link(link, target_blank=True):
 if target_blank:
  link.set('target', '_blank')
 link.set('title', url_filename(link.get('href')))

def fixup_link ( link , target_blank = True ) : if target_blank : link . set ( 'target' , '_blank' ) link . set ( 'title' , url_filename ( link . get ( 'href' ) ) )
set certain attributes we want on every link .