def generate_alias(tbl):
 return u''.join(([l for l in tbl if l.isupper()] or [l for (l, prev) in zip(tbl, (u'_' + tbl)) if ((prev == u'_') and (l != u'_'))]))

def generate_alias ( tbl ) : return u'' . join ( ( [ l for l in tbl if l . isupper ( ) ] or [ l for ( l , prev ) in zip ( tbl , ( u'_' + tbl ) ) if ( ( prev == u'_' ) and ( l != u'_' ) ) ] ) )
generate a table alias .