if invalid_choices:
options = [", ".join(e) for e in [invalid_choices, defaults]]
raise ValueError(""%s" is not an valid option. Valid index "
"values are `None` or %s" % tuple(options))
def _check_ch_locs(chs):
After Change
plural = ("is not a valid option",
"are not valid options")[int(len(invalid) > 1)]
raise ValueError(""{}" {}. Valid index options are `None`, {}"
.format(", ".join(invalid), plural, ", ".join(valid)))
return index