-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously tagged unions only supported `str` tag values. We now also support `int` tag values, with a few caveats: - A single `Union` of `Struct` types cannot mix both `int` and `str` tag types. - Integer `tag` values currently only support values that fit in an int64 (-2**63 <= tag <= 2**63 - 1). This restriction has also been added to `IntEnum` and integer `Literal` types (previously these supported up to a `uint64`). This restriction makes the implementation easier, but can be removed if needed in the future. For now a `NotImplementedError` is raised if the user attempts to use out-of-range integer values, pointing them to raise an issue on GitHub if they need the feature.
- Loading branch information
Showing
9 changed files
with
1,023 additions
and
496 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.