How Can i useing match method in micropython_v1.19.1 firmware? #10007
Answered
by
dlech
QiaoTuCodes
asked this question in
Hardware & Peripherals
-
i try useing match method like that: def http_error(status):
match status:
case 400:
return "Bad request"
case 404:
return "Not found"
case 418:
return "I'm a teapot"
case _:
return "Something's wrong with the internet" but it's no working. this's a new method of use in Python3.10. we can also add this method? |
Beta Was this translation helpful? Give feedback.
Answered by
dlech
Nov 18, 2022
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
QiaoTuCodes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please see #7847 and #9850.