Skip to content

Commit

Permalink
docs: add example of Tuplex shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
PrettyWood committed Jan 30, 2021
1 parent 7c9a416 commit 16c0cef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ assert isinstancex((3, "a", "b", "c", True), Tuplex[int, str, ..., bool]) is Tru
assert isinstancex((3, "a", "b", "c", 3), Tuplex[int, str, ..., bool]) is False
assert isinstancex((3, "a", "b", "c", True, False), Tuplex[int, str, ..., bool, ...]) is True

# Tuplex (shortcut)
assert isinstancex((True, "q", "q", "q", "q"), (bool, Literal["q"], ...)) is True

# Type
class User: ...
class BaseUser(User): ...
Expand Down

0 comments on commit 16c0cef

Please sign in to comment.