Vertigo @ MFF is a user on mastodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse.
If you don't, you can sign up here.
Thank you #J#APL. I cannot think of a cleaner way of expressing this logic.
options_specified = [1 for x in [args.username, args.email, args.id] if x] number_of_options_given = sum(options_specified) if number_of_options_given > 1: LOG.error(...)
@vertigo is this Python? How do you feel about sum(map(bool, [args.username, …]))?