The NEW Match-Case Statement in Python 3.10

The NEW Match-Case Statement in Python 3.10

James Briggs

3 года назад

26,688 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Maric
Maric - 23.02.2022 05:09

i think the part between 5-15 minutes could have been more concise/pre-coded and quickly explained
otherwise amazing video! many people think its just a switch-case, but no it can be used that way, but it has none of the speed advantages of switch case in C++ for example
but the matching, oh god the matching is so powerful!

Ответить
robd003
robd003 - 23.06.2021 06:28

Does anyone know how much faster this is than doing if / elif trees?

Ответить
Martin Hjelm
Martin Hjelm - 10.06.2021 13:37

Thanks for great tutorial! In the final example, you check for answers longer than 0 does that happen implicitly in the match code as well?

Ответить
SZ
SZ - 11.05.2021 22:00

Excited for match case in python.

Ответить
Robert Lugg
Robert Lugg - 26.04.2021 20:18

I wonder how much Rust influenced the decision to add the match statement.

Ответить
Mey Lyssa
Mey Lyssa - 18.04.2021 08:13

Cool content, thanks a lot!

Ответить
HaloGrndr
HaloGrndr - 02.04.2021 02:53

From a non-compsci background, what is the difference between this and just re-creating the functionality using a dictionary?

I.e. the dictionary is used to determine case and can be used to point to a function or value.

Ответить
Yousha
Yousha - 28.03.2021 09:19

I have not yet watch it in total, but it seem that can we use it to replace if-else statement.

Ответить
Andre Müller
Andre Müller - 26.03.2021 15:51

The last part is the most interesting part. The direct comparison of the two different implementations show the benefit of structural pattern matching very good.

Ответить
wlgrd
wlgrd - 26.03.2021 02:24

Awesome example, thank you

Ответить
Elder Beserra
Elder Beserra - 25.03.2021 19:01

Great content!

Ответить
w T.V
w T.V - 21.03.2021 17:15

Thanks you too much

Ответить
Algorithmic Trading by Sajid
Algorithmic Trading by Sajid - 21.03.2021 13:53

Great content, just a comment to help the algorithm to push your content, you deserve it :)

Ответить
Pierre
Pierre - 21.03.2021 09:34

why the fuck didn't they call it switch ffs.

Ответить
Yiannis
Yiannis - 20.03.2021 13:43

Pattern matching isn’t just a switch case. You need to understand the fundamentals of the concept before making a video on it

Ответить
Flask App
Flask App - 20.03.2021 04:51

is this jupyterlab? thanks

Ответить
Guilherme Torelly
Guilherme Torelly - 20.03.2021 03:39

Thank you for this awesome video, it's very well explained. I also learned about reading and writing files in chunks, didn't know that was a possibility.

Ответить
Douwe
Douwe - 20.03.2021 01:50

Pitty they did not use case else rather than case _ for catch all.

Ответить
Michael
Michael - 20.03.2021 00:32

Downvoted for spending so much time writing code that hasn't nothing to do with match case.

Ответить
Larry Raab
Larry Raab - 19.03.2021 20:20

Do you have a link to the code you did just so I can keep it for copy/pasting in the future as I try it out?

Ответить