ALL of Python 3.13's MAJOR typing changes

  Рет қаралды 11,520

Carberra

Carberra

Күн бұрын

Пікірлер: 23
@renren_does_programming
@renren_does_programming 2 ай бұрын
Nice, one step closer to pi-thon
@PennyEvolus
@PennyEvolus 2 ай бұрын
Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan Shikanokonoko koshitantan
@maleldil1
@maleldil1 2 ай бұрын
Why do you use the old generics syntax for these examples? IMO, it doesn't much sense to use the old syntax when the new one is available. I understand using it for more general videos, so they apply to a wider public, but not here. Regardless, I'd appreciate it if you could show both versions anyway. Anyway, great video. Hopefully pyright implements the new typing stuff soon.
@Carberra
@Carberra 2 ай бұрын
Largely because the PEP uses the old syntax, and neither Mypy or Pyright was particularly happy using the new syntax with defaults, so I decided to go with what's definitely known to work rather than complicate it. Glad you enjoyed the video though!
@Heavy_Lvy
@Heavy_Lvy 2 ай бұрын
@@Carberra i hate the old syntax😭😭
@Heavy_Lvy
@Heavy_Lvy 2 ай бұрын
7:16 probably the extension is using a older version of pyright or mypy. The extension won't use the pyright/mypy version installed on your environment.
@Carberra
@Carberra 2 ай бұрын
I was using the latest version of Pyright (at time of recording) from the terminal, not an extension. If Pyright doesn't support something, it's pretty much a dead cert Mypy doesn't support it either.
@Heavy_Lvy
@Heavy_Lvy 2 ай бұрын
@@Carberra hmm thats strange then, it was working fine for me just not default TypeVars with 3.13 syntax.🤷‍♂🤷‍♂🤷‍♂🤷‍♂
@EngineerNick
@EngineerNick 2 ай бұрын
Thankyou this was a great summary and demo :)
@fmitchell238a
@fmitchell238a 2 ай бұрын
Thanks for this. I'm just now catching up on 3.13's features. A video on support for Protocols would be appreciated. My statically typed brain still can't quite fit itself around Python's protocols using duck typing, and compile-time or run-time predicates verifying that a class conforms to a Protocol would make using Protocols feel like black magic (or pure superstition).
@Carberra
@Carberra 2 ай бұрын
Glad you enjoyed it! Protocols is actually a topic I've been meaning to cover for a while, so I'll bump that up the queue! The runtime checkable thing is a pretty nice feature, so I'll make sure to cover that as well.
@marckiezeender
@marckiezeender 2 ай бұрын
Protocols are basically just interfaces but without explicitly implementing them.
@jimhrelb2135
@jimhrelb2135 2 ай бұрын
I use Protocols to enforce kwargs types, so not just using Callable to enforce vargs
@murphygreen8484
@murphygreen8484 2 ай бұрын
What's the benefits of ReadOnly over Final?
@Carberra
@Carberra 2 ай бұрын
Can you use Final in TypedDicts? If so, I'm honestly not sure!
@murphygreen8484
@murphygreen8484 2 ай бұрын
@@Carberra oh I'm not sure, it's part of the typing library though! Speaking of typing things - why is typing a openpyxl object such a nightmare? I can't get PyCharm to recognize it
@Carberra
@Carberra 2 ай бұрын
I believe Openpyxl isn't typed. If it has a stubs package, might be a case of installing that and getting PyCharm to recognise it? Though this isn't the first time I've heard about someone having trouble _this week_, so idk if something's going on.
@chrism6880
@chrism6880 2 ай бұрын
Is it possible to back port the new repl to use it with older python versions?
@Carberra
@Carberra 2 ай бұрын
Not to my knowledge. You can use the third-party IPython REPL in older versions though, which is different but very nice to use.
@solojazz75
@solojazz75 2 ай бұрын
wait I thought that python 3.13 was about using 'type' as a keyword instead of TypeVar
@Carberra
@Carberra 2 ай бұрын
3.12 introduced the type keyword as an alternative to TypeAlias. It also introduced an alternative syntax for TypeVars (though I haven't used that here as it's not fully supported by type checkers).
@solojazz75
@solojazz75 2 ай бұрын
@@Carberra yeah i was with the idea it's the preferred way over TypeVar now. type T = ContextType
@solojazz75
@solojazz75 2 ай бұрын
it seems a bit more pythonic that TypeVar
Are metaclasses the HARDEST thing in Python?
20:41
Carberra
Рет қаралды 5 М.
Python 3.12 Generic Types Explained
18:27
ArjanCodes
Рет қаралды 64 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
Real 10x Programmers Are SLOW To Write Code
14:51
Thriving Technologist
Рет қаралды 68 М.
Was I Wrong About Blazor? | Coding Shorts 111
16:35
Shawn Wildermuth
Рет қаралды 28 М.
Python 3.13 release: bye GIL, hi JIT, new REPL!
8:45
Carberra
Рет қаралды 28 М.
Is Functional Programming DEAD Already?
21:07
Continuous Delivery
Рет қаралды 75 М.
What You Need To Know About Python 3.13
15:45
Jake Callahan
Рет қаралды 11 М.
Python's contextlib is a HIDDEN GEM
14:55
Carberra
Рет қаралды 12 М.
Why You Should Think Twice Before Using Returns in Python
21:27
ArjanCodes
Рет қаралды 43 М.
The New Python 3.13 Is FINALLY Here!
20:39
ArjanCodes
Рет қаралды 94 М.
Generics are VITAL in typed Python
16:54
Carberra
Рет қаралды 11 М.
Reacting to Controversial Opinions of Software Engineers
9:18
Fireship
Рет қаралды 2,1 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН