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
fromcollectionsimportnamedtupleX=namedtuple('X', 'a, b')
x=X(1, 'x')
x=X(b='y', a='x') # error: Unexpected keyword argument "a" for "X"x.a+ [1] # error: "X" has no attribute "a"classY(X):
"""you can use a namedtuple class as a base class"""
The text was updated successfully, but these errors were encountered:
I will add it to PR #1810, although it's easy enough not to wait for it. It requires a single line change here. Changing items = str_expr.value.split() into items = str_expr.value.replace(',', ' ').split()
However, as discussed in the Enum case, it's a good idea not to use this form.
The text was updated successfully, but these errors were encountered: