def cmpPeople(p1, p2):
 p1b = (getattr(p1, 'billingPos', None) or _last)
 p2b = (getattr(p2, 'billingPos', None) or _last)
 if (p1b > p2b):
  return 1
 if (p1b < p2b):
  return (-1)
 p1n = p1.get('canonical name', _last)
 p2n = p2.get('canonical name', _last)
 if ((p1n is _last) and (p2n is _last)):
  p1n = p1.get('name', _last)
  p2n = p2.get('name', _last)
 if (p1n > p2n):
  return 1
 if (p1n < p2n):
  return (-1)
 p1i = p1.get('imdbIndex', _last)
 p2i = p2.get('imdbIndex', _last)
 if (p1i > p2i):
  return 1
 if (p1i < p2i):
  return (-1)
 return 0

def cmpPeople ( p1 , p2 ) : p1b = ( getattr ( p1 , 'billingPos' , None ) or _last ) p2b = ( getattr ( p2 , 'billingPos' , None ) or _last ) if ( p1b > p2b ) : return 1 if ( p1b < p2b ) : return ( - 1 ) p1n = p1 . get ( 'canonical name' , _last ) p2n = p2 . get ( 'canonical name' , _last ) if ( ( p1n is _last ) and ( p2n is _last ) ) : p1n = p1 . get ( 'name' , _last ) p2n = p2 . get ( 'name' , _last ) if ( p1n > p2n ) : return 1 if ( p1n < p2n ) : return ( - 1 ) p1i = p1 . get ( 'imdbIndex' , _last ) p2i = p2 . get ( 'imdbIndex' , _last ) if ( p1i > p2i ) : return 1 if ( p1i < p2i ) : return ( - 1 ) return 0
compare two people by billingpos .