-
Notifications
You must be signed in to change notification settings - Fork 263
Closed
Description
Sometimes you want to say that an argument must follow two or more different protocols. For example, you might want to state that an argument must be an Iterable and a Container (for example, it could be a Set, a Mapping or a Sequence). It would be nice if this could be spelled like this:
def assertIn(item: T, thing: Intersection[Iterable[T], Container[T]]) -> None:
if item not in thing:
# Debug output
for it in thing:
print(it)
blakehawkins, wrmsr, antonagestam, maxfischer2781, decorator-factory and 34 more
Metadata
Metadata
Assignees
Labels
No labels