def _encode_list(name, value, check_keys, opts):
 lname = gen_list_name()
 data = ''.join([_name_value_to_bson(next(lname), item, check_keys, opts) for item in value])
 return (((('\x04' + name) + _PACK_INT((len(data) + 5))) + data) + '\x00')

def _encode_list ( name , value , check_keys , opts ) : lname = gen_list_name ( ) data = '' . join ( [ _name_value_to_bson ( next ( lname ) , item , check_keys , opts ) for item in value ] ) return ( ( ( ( '\x04' + name ) + _PACK_INT ( ( len ( data ) + 5 ) ) ) + data ) + '\x00' )
encode a list/tuple .