I just found the doc for 'join'. I'll make the correction tomorrow.

Thanks.

On 13-09-26 03:14 PM, Adrian Sampson wrote:
>>      for genre in list(genres):
>>          if _is_allowed(genre):
>> -            return genre.title()  # Title case.
>> -    return None
>> +            allowed_genres.append(genre.title())
>> +
>> +#    pdb.set_trace()
>> +
>> +    for genre in allowed_genres[:-1]:
>> +        genre = genre + ', '
>> +        allowed_genres_copy.append(genre)
>> +    else:
> 
> Sorry, momentary brainfart—I meant to say that the block is *always* executed because there's no `break`. (In Python, the `else` block in a `for` is only executed if the loop doesn't break.)
> 
> Overall, is it correct to say that this loop (and the lines below) could be replaced with `return ', '.join(allowed_genres)`?
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/sampsyo/beets/pull/397/files#r6611183
>