22.01.2021 14:49, Kevin Wolf wrote:
Am 16.01.2021 um 14:44 hat Vladimir Sementsov-Ogievskiy geschrieben:
+ if 'disabled' not in groups and 'disabled' not in exclude_groups:
+ # Don't want to modify function argument, so create new list.
+ exclude_groups = exclude_groups + ['disabled']
Oops, forgot the other comment I wanted to make:
This would only have been needed if you had turned exclude_groups into a
Sequence. Now that it's still a list, copying the list isn't strictly
necessary.
I just think that such side effects (changing function arguments when it is not
part of function intention) are better to avoid.
--
Best regards,
Vladimir