Goodbye, List! Type hinting standard collections - New in Python 3.9

preview_player
Показать описание
New way to type hint standard collections in Python 3.9.

SUPPORT ME ⭐
---------------------------------------------------

BE ACTIVE IN MY COMMUNITY 😄
---------------------------------------------------
Рекомендации по теме
Комментарии
Автор

I don't know how many months I have been confused about the differences between type hinting with list[] and List[]. I have seen both floating around online but had no clue what the difference was. It makes perfect sense that list[] is the new way as of Python 3.9 and that List[] is now deprecated. Thanks so much!

andrewglick
Автор

I really hope that all this static typing that is coming more and more into python will result in cpython being much faster in the future.

Kaslor
Автор

Beginner Dev: C is hard. Let's learn python.
Advance Dev: C is hard. Let's make python like C.

AnyFactor
Автор

Sleep habits of a developer. I see you man lol. 10/10

Xaminn
Автор

cool vid! I'm going to watch all yr videos :)

jakubunold
Автор

Hi, thanks for the summary.

5:44 Is "dunder" short for "double underscore"?

joseville
Автор

Julia does it so much better and makes it easy. I wish more people used it so there are not packages and I can work more easily

muhammadsaadmansoor
Автор

Thanks James. I've always been of two minds about duck-typed languages, certainly they take a huge burden off the developer to get something correct-ish in a hurry, but for production/maintenance I'm not convinced they are robust enough. Seems like the type hinting stuff is an easy fit into the language - just some arcane new attributes (term used loosely) in the underlying representation of the objects. It is kind of ironic that Python is having to shoehorn this into the language; perhaps as an admission that duck-typing is not all it was thought to be.

nixonkutz
Автор

how to use keapord shortcut to import something in pycharm?

areal
Автор

so, its a good practice to use list, dict, set instead of List, Dict or Set from de typing library?

miguelvasquez
Автор

"Good bye List", looks like an introduction to Numpy array. Honestly this kind of stuff is getting further from Python… And it reminds me of my fear of looking at the C family code.

justinzhang
Автор

hi, thanks for this good python video! One doubt: if quantified how much will be the benefit in term of runtime performance of typed python scripts vs classic untyped one? Thanks and see you next time!

jacopodigiacomantonio
Автор

@9:38 what is the keyboard shortcut? Does the same thing work in VS Code? What is an intelligent methodical, deliberative way that I can go about learning this stuff? I've been using Python for years & typically know very little of the things covered by mcoding!

EzraSchroeder
Автор

Does 'list[int]().append("a")' throw an error?

joseville
Автор

So I added some type hints and CI flagged issues with 3.8 and it seems to be this.

So I will just revert them instead of importing typing for now. 3.8 is EOF in October this year.

Veptis
Автор

Does this mean that python will now be as fast when it comes to certain iterations/operations without the need of other libraries? I mean does this ability to 'create' a list that holds objects of a certain type, make list faster now or is numpyarray still the way to go?

adedamolaadewunmi
Автор

was this really your first video? I can't see any earlier ones, but you say "back with another"

MrRyanroberson
Автор

Not a bad Christopher Walken impression. ;)

bartuslongus
Автор

Would not comparing list[int] to list, always fail because it’s like comparing [] to list. One is a list and the other is a function?

iwacher
Автор

Being a non-native English speaker I wonder who some terms are pronounced. I noticed that "str" you pronounce as "stir" and not "string" from which the str is derived. Any background on that? BTW: Thanks for your videos they are brief and up to the topic (if that translates).

PestOnYT