@@ -30,22 +30,6 @@ class Alias(NamedTuple):
3030    separator : str 
3131
3232
33- def  sequence_to_str (seq , separator ):
34-     """ 
35-     Join a sequence (list, tuple) into a string with the specified separator. 
36- 
37-     Examples 
38-     -------- 
39-     >>> sequence_to_str((1, 2, 3), "/") 
40-     '1/2/3' 
41-     >>> sequence_to_str((1, 2, 3), ",") 
42-     '1,2,3' 
43-     >>> sequence_to_str((1, 2, 3), " ") 
44-     '1 2 3' 
45-     """ 
46-     return  separator .join (str (item ) for  item  in  seq )
47- 
48- 
4933def  convert_aliases ():
5034    """ 
5135    Convert PyGMT parameters to GMT options. 
@@ -83,12 +67,12 @@ def convert_aliases():
8367    params  =  p_locals .pop ("kwargs" , {}) |  p_locals 
8468
8569    # Define a dict to store GMT option flags and arguments 
86-     kwdict  =  defaultdict (lambda : "" )  # use defaultdict to avoid KeyError  
70+     kwdict  =  defaultdict (lambda : "" )  # default value is an empty string  
8771    for  alias  in  p_locals .get ("_aliases" ):
8872        value  =  params .get (alias .name )
8973        if  is_nonstr_iter (value ):
9074            if  alias .separator  !=  "" :
91-                 value  =  sequence_to_str ( value ,  alias .separator )
75+                 value  =  alias .separator . join ( str ( item )  for   item   in   value )
9276            else :
9377                value  =  "" 
9478        elif  value  in  (None , False ):  # None or False are skipped 
0 commit comments