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
Right now, SequenceParser and OptionalParser return Python lists. This was originally done because [] is syntactically easier to work with than (). However, these are not really intended to be mutable sequences. This plays badly with typing, which has no concept of "a list of length 2 containing a string followed by an int", but does have tuple[str, int].
This is a breaking change, though not massively so because, at least for me, the outputs are typically splatted in a dataclass, destructured, concatenated with each other, length-checked, sliced, or indexed, all of which will work unchanged with tuples.
The text was updated successfully, but these errors were encountered:
Right now,
SequenceParser
andOptionalParser
return Pythonlist
s. This was originally done because[]
is syntactically easier to work with than()
. However, these are not really intended to be mutable sequences. This plays badly with typing, which has no concept of "a list of length 2 containing a string followed by an int", but does havetuple[str, int]
.This is a breaking change, though not massively so because, at least for me, the outputs are typically splatted in a dataclass, destructured, concatenated with each other, length-checked, sliced, or indexed, all of which will work unchanged with
tuple
s.The text was updated successfully, but these errors were encountered: