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
There are bugs when using these expressions, I don't know everything, but this code doesn't work only in Jupyter Notebook:
forxin ([], {}):
matchx:
caselist(_):
print('[OUTPUT] Do something with list')
casedict(_):
print('[OUTPUT] Do something with dict')
Error message:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Input In [74], in <cell line: 1>()
1 for x in ([], {}):
2 match x:
3 case list(_):
4 print('[OUTPUT] Do something with list')
----> 5 case dict(_):
6 print('[OUTPUT] Do something with dict')
TypeError: called match pattern must be a type
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Some bugs
Error message:
Fix it please.
— Sincerely, Gnifajio None.
Beta Was this translation helpful? Give feedback.
All reactions