Chris Angelico wrote: > Hold on a moment, how often do you really do this kind of thing with > "might be one of them or a sequence"?
isinstance(obj, one_class_or_tuple_of_classes) issubclass(cls, one_class_or_tuple_of_classes) mystr.startswith(prefix_or_tuple_of_prefixes) mystr.endswith(suffix_or_tuple_of_suffixes) template % one_string_or_tuple_of_strings # or a dict :-) I'm not suggesting that the specific example is a good one, but the principle is sound. -- Steven -- https://mail.python.org/mailman/listinfo/python-list