You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support star unpacking of operators, aliases, and tuples (#70)
Aliases and tuples weren't working for a simple reason, which is that
unpacking a types.GenericAlias with a `*` doesn't produce an `Unpack`,
but produces a `types.GenericAlias` with `__unpacked__` set. Since we
didn't consider that, we would simply lose track of it. Fix that by
stripping __unpacked__, evaling the inner type, and adding an Unpack.
Built-in operators didn't work because `_GenericAlias` produces an
`_UnpackGenericAlias` when iterated, and `_UnpackGenericAlias` raises
an exception when it is passed to a variadic generic if it's body is
either sort of generic alias but isn't a tuple. Fix that by a bunch
of annoying overloading of what aliases our operators produce.
And then, with the annoying parts done, we just need to actually
implement the unpacking of tuple types.
0 commit comments