@command('mix\\s*(\\d{1,4})')
def mix(num):
 g.content = (g.content or content.generate_songlist_display())
 if (g.browse_mode != 'normal'):
  g.message = util.F('mix only videos')
 else:
  item = g.model[(int(num) - 1)]
  if (item is None):
   g.message = util.F('invalid item')
   return
  item = util.get_pafy(item)
  try:
   plist(('RD' + item.videoid))
  except OSError:
   g.message = util.F('no mix')

@ command ( 'mix\\s*(\\d{1,4})' ) def mix ( num ) : g . content = ( g . content or content . generate_songlist_display ( ) ) if ( g . browse_mode != 'normal' ) : g . message = util . F ( 'mix only videos' ) else : item = g . model [ ( int ( num ) - 1 ) ] if ( item is None ) : g . message = util . F ( 'invalid item' ) return item = util . get_pafy ( item ) try : plist ( ( 'RD' + item . videoid ) ) except OSError : g . message = util . F ( 'no mix' )
returns an iterator that alternates the given lists .