The NEW Match-Case Statement in Python 3.10

The NEW Match-Case Statement in Python 3.10

James Briggs

3 года назад

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

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


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

@TheFunny
@TheFunny - 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?

Ответить
@imichael.
@imichael. - 20.03.2021 00:32

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

Ответить
@DouwedeJong
@DouwedeJong - 20.03.2021 01:50

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

Ответить
@GuilhermeTorelly
@GuilhermeTorelly - 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.

Ответить
@flaskapp9885
@flaskapp9885 - 20.03.2021 04:51

is this jupyterlab? thanks

Ответить
@pierre1360
@pierre1360 - 21.03.2021 09:34

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

Ответить
@AlgoTradingX
@AlgoTradingX - 21.03.2021 13:53

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

Ответить
@dabody123456
@dabody123456 - 21.03.2021 17:15

Thanks you too much

Ответить
@eldermetal1
@eldermetal1 - 25.03.2021 19:01

Great content!

Ответить
@wlgrd7052
@wlgrd7052 - 26.03.2021 02:24

Awesome example, thank you

Ответить
@deadeye1982a
@deadeye1982a - 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.

Ответить
@skynet.yousha
@skynet.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.

Ответить
@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.

Ответить
@meylyssa3666
@meylyssa3666 - 18.04.2021 08:13

Cool content, thanks a lot!

Ответить
@RobertLugg
@RobertLugg - 26.04.2021 20:18

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

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

Excited for match case in python.

Ответить
@martinhjelm4223
@martinhjelm4223 - 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?

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

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

Ответить
@Maric18
@Maric18 - 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!

Ответить