Тёмный

What's New In Python 3.12 

Indently
Подписаться 213 тыс.
Просмотров 83 тыс.
50% 1

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 74   
@vinhlo2637
@vinhlo2637 Год назад
I love how they add the override decorator, it makes the code clearer and easier to read.
@cranberry888
@cranberry888 Год назад
do I understand correctly that this new decorador is just syntax sygar right? It could override methods before, but with this decorador it just get hinting and check
@nicolasc.1968
@nicolasc.1968 Год назад
​@@cranberry888correct. Writing a method in a child class with the same name and number of arguments would override it without the need for the decorator.
@Indently
@Indently Год назад
I'm excited to cover these features in more detail when they come out in the stable release of 3.12!
@SkyFly19853
@SkyFly19853 Год назад
Python has so much potential. Especially for video game development.
@LeWolfYT
@LeWolfYT Год назад
i can’t wait for 3.12 to release. in a perfect world there would be an easier way to migrate python.
@carloscorrea260
@carloscorrea260 Год назад
It is interesting how languages that didn´t use types now use types, i was a "not types lover" because not using types allows you to be more "flexible", but not anymore, types are importan, maybe not in small projects but in bigger projects when you work with others, types matter a lot
@djixi98
@djixi98 Год назад
2:43 Whoever was writing these notes is obviously a fan of Sleep Token! Phenomenal band that everyone should check out!^^
@Indently
@Indently Год назад
Someone else mentioned this, but I didn't know they were referring to a band when they mentioned "token". I thought I was missing out on some programming features. I will check it out!
@Andrumen01
@Andrumen01 Год назад
For the multiline f-strings, extremely useful when using functions with multiple parameters. For example using Path (from pathlib), where you have a really long path that can span multiple lines. That is extremely useful!
@DrDeuteron
@DrDeuteron Год назад
how is pathlib different from os.path? What am I missing.....
@Andrumen01
@Andrumen01 Год назад
@@DrDeuteron ??? Why the question?
@DrDeuteron
@DrDeuteron Год назад
cause I don't want to RTFM
@Indently
@Indently Год назад
I don't mean to intrude, but now I'm curious as well, but not curious enough to search it 😂 (I will search it now)
@Indently
@Indently Год назад
According to the first google search: The os module represents paths as strings with which you cannot do much. The pathlib module represents paths as special objects with useful methods and attributes. Source: builtin.com/software-engineering-perspectives/python-pathlib#
@Ierzi
@Ierzi Год назад
Can your first video on python 3.12 be on the new type statement?
@thisoldproperty
@thisoldproperty Год назад
Not sure if it's something you'd like to cover.. installing 3.11 or 3.12 onto a Linux distribution that already has a default python version installed. Some might find it useful.
@snesmocha
@snesmocha Год назад
It’s a quick Google search how to use pip to update your python version though
@dmitripogosian5084
@dmitripogosian5084 Год назад
What's the problem ? On Gentoo you can have many concurrent versions of Python
@vorpal22
@vorpal22 Год назад
Definitely happy to see an override decorator and the easier generics. Otherwise, I'm not really as excited about this release as I was about some of the others.
Год назад
Huh, Python Dev is a fan of Sleep Token, nice.
@banatibor83
@banatibor83 Год назад
So python copies go routines from golang :) Better multithreading will definitely benefit python. On the other hand I do not understand the TypeDict nonsense. If you have to inherit from TypeDict and create a class, why do not just pass an instance of that class? Kwargs just make the code unreadable.
@filippavlovic18
@filippavlovic18 Год назад
Didnt expect Sleep Token as an example for f-strings lol
@djixi98
@djixi98 Год назад
just commented that myself, guess they're pretty popular rn! Good on them^^
@vmr_1997
@vmr_1997 Год назад
lmao jumped my eye too, cool!
@ClaudioBOsorio
@ClaudioBOsorio Год назад
I really like the hype on these things. Although I dont use Python extensively this should be like the patch notes everyone reads for games. Lets see what's new and what are the new features that can help us out
@Mr.Derpus
@Mr.Derpus Год назад
I love the SleepToken references in the code
@lorenzomonacelli
@lorenzomonacelli Год назад
The removal of distutils is a terrible strike. Much more work to migrate from python 3.11 to 3.12 than it was between python 2 and 3 for me.
@MrSongbird
@MrSongbird Год назад
All the f-string changes are huge and feel so long overdue.
@python-programming
@python-programming Год назад
I nest F strings all the time. This is so nice! (Although I've never nested 6 f-strings. Challenge accepted! =)
@moondevonyt
@moondevonyt Год назад
hey fam, i've got mad respect for your effort in breaking down the new features in Python 3.12 you've got a killer way of explaining things and it's dope to see you staying updated with the latest releases but real talk, while these updates are fresh, sometimes i wonder if Python's trying to pack in too many features makes it harder for newcomers and even some seasoned devs to keep up. like, sometimes less is more, you feel me? but still, keep these vids coming cause they're straight fire
@mmmhorsesteaks
@mmmhorsesteaks Год назад
Nothing forces you to use them. Or even teach them to newcomers. Maths classes also don't start by throwing the kitchen sink at you... But on the off chance they are useful to you, they are there.
@dapodix
@dapodix Год назад
Wouldn't you make this observation to any advancement in tech (or beyond) today? Sure, every project has to innovate and change is constant - it's how change is pushed out that makes it a quality hallmark of the successful/enduring projects. You can still program in the older python 2-ish style and get quite far that way - lots of codebases are set up this way today. If you'd like to push envelopes and stop walking through treacle - you make code relevant, interesting, concise, readable with newer features available to you in the language.
@dinoscheidt
@dinoscheidt Год назад
2:57 well these nested f-strings are certainly great at enabling more SQL injections….
@adrienc8716
@adrienc8716 Год назад
what about its speed compared to 3.11 ? Do we have a % increase somewhere ??
@JarppaGuru
@JarppaGuru 11 месяцев назад
do we care if same code works and not annowing this is changed. if it faster then who cares lol
@ЕвгенийАндреев-з2э
Slowly moving towards C++, hah :)
@WLockIV
@WLockIV Год назад
AWS lambda support in 2030
@zyxyuv1650
@zyxyuv1650 Год назад
Why can't we remove the conservative old parts of Python that make it un-JIT-able? It's not like removing that stuff makes any difference in reality. Just look at PyPy, it's not like PyPy is actually crippled in any way, except for compatibility. And compatibility isn't that important when there's the opportunity for a major version number change. Python could be JIT-able in V4 and we're going to BLOW IT...come on people, organize
@Danielagostinho21
@Danielagostinho21 Год назад
How do you update python easily? Last time I did it it was quite tedious, install the new version from website, change path variables and then reinstall the modules from the old version to the new version with pip. Is there a better way to do it?
@xappz
@xappz Год назад
use virtual environments. each project should have its own python version and packages pinned with a requirements file, that way other people can run your code, or maybe even you in the future when coming back to an old project that ran on older versions.
@medicallyunexplainedsymptoms
Soldering - don't tin the tip of the iron before soldering. It should clean and shiny when presented to the work. Tinning the tip burns off the flux that is supposed to help the process before you actually need it, and can make the solder a bit 'second hand'. 1. Clean tip 2. Heat up the joint you're soldering with the clean tip (uniformly - heat everything you are soldering) 3. Add solder and let it flow. More heat may be needed 4. Remove solder 5. Remove iron 6. Clean and tin the iron. Adding solder to the tip for when the iron's in the stand stops it going dull. (I do electronics for a living, and used to build aerospace hardware.)
@robertobokarev439
@robertobokarev439 Год назад
**Make true unsafe multithreading in Python with exceptions of deadloop, race condition etc.** Guido: Nah **Invent new feature sucking out your memory even more no one's gonna use because Cython exists** Guido: Hell yeah!
@EpicNoobx
@EpicNoobx Год назад
i'm so excited for this update!
@mbokil
@mbokil Год назад
Have been testing out RC 2 it the performance is really nice. Excited about this release for October
@tigerbojiteol
@tigerbojiteol Год назад
What’s the benefit of using typing class over dataclasses since dataclasses has more feature and functionalities. Why isn’t Python foundation opting dataclasses as built-in module?
@abhishankpaul
@abhishankpaul Год назад
We came this far, I think variable type declaration should be used asap. Python wastes a lot of time to check data type of variables inside loops and functions. I mean, we can just add a bunch of lines to tell Python which variable is what
@Patrick1985McMahon
@Patrick1985McMahon Год назад
Python is still ugly.
@AntonioZL
@AntonioZL Год назад
The per-interpreter GIL is what I'm anticipating the most!
@DrDeuteron
@DrDeuteron Год назад
2:42 in-line comments in a continued line? I shall cast the 1st stone.
@emaaaaax
@emaaaaax Год назад
did they seriously just add typedef from c lol
@HitBoxMaster
@HitBoxMaster Год назад
PyTorch still isn't on 3.11 lmao
@rupaksaha9050
@rupaksaha9050 Год назад
How can we update to python 3.12? Please make a video.
@Indently
@Indently Год назад
I can make a video when 3.12 is released
@miguelguthridge
@miguelguthridge Год назад
Those easier generics look awesome!
@rusektor
@rusektor Год назад
It's strange, but @override didn't work for me
@ScienceD9000
@ScienceD9000 Год назад
That decorator is just documentation, it does not do anything
@xlerb_again_to_music7908
@xlerb_again_to_music7908 Год назад
My simulation systems are process speed bound. All these new features look nice, but will they speed things up? The sub-interpreter with its own GIL may be useful (but all I did before was to use command line to start a new python instance, so that got its own GIL - thus no real speedup available for me). I want more speed; python is the slowest of the modern languages :(
@saadahmed688
@saadahmed688 Год назад
If you wanted speed then why didn't you go with rust, go, c++ or even java?
@xlerb_again_to_music7908
@xlerb_again_to_music7908 Год назад
@@saadahmed688 sunk costs. My uni was using python in 2013, and I hadn't coded for 25 years. It was easier to go with the flow and build skills not used since my pascal days; after a few years python was my go-to. If I was starting over, I'd use nim (closer to C but using very python syntax). FYI the goal was to get a doctorate and python was an enabler; a stepping stone to build a simulator the like that had not been seen. In the end I needed 4 PCs running for 18 months on a 106 k line python codebase, delivering 10,000 very accurate EV simulations per thread per second to achieve what I wanted. Many would not have considered writing a system so big (all by my hand - coding took nearly 3 years including test and system verification), but I was coding since the late '60s and have tackled several large projects. Pythons interactive nature greatly sped development, but runtimes were terrible and memory management on Windows caused problems. As in, Windows ignores gc releases until the process parent dies => hog city. Well, in 2.7 that was the case...
@dmitripogosian5084
@dmitripogosian5084 Год назад
You should not be using python for speed bound parts of your project
@xlerb_again_to_music7908
@xlerb_again_to_music7908 Год назад
@@dmitripogosian5084 so sorry; I didn't have a spare 3 years to write it again. Development speed was paramount. The work was to a time limit, and yes I did try alternatives available in the Uni (and having support from the computing profs was important). Matlab was the major alternative but succumbed quickly to the stresses of a real project. Back in that day, lots of problems including type sensitivity in compound structs. If you defined a new type with several elements, like in C, Matlab insisted that each type was written / assigned variables _in the same sequence._ That is, with a compound type instantiated with 3 elements a, b, c as a1, b1, c1 and a2, b2, c2 ...to interoperate they must be assigned values (post creation) in the same order. Changing a1, c1 then a2, c2 all OK. But if you had set c2 then a2 (with the same values) the type system declared this new alien thing had a different type to a1, b1, c1; working between them now forbidden! That was enough for me on top of other problems; Matlab binned. And as said, if starting now I'd use nim. But hindsight is a wonderful thing! :)
@SusanAmberBruce
@SusanAmberBruce Год назад
I'm interested, if you were doing something with GUI, would you use tkinter for that or what?
@KeithKazamaFlick
@KeithKazamaFlick Год назад
CustomTKinter
@Geraldonimosito
@Geraldonimosito Год назад
Dearpygui is very nice too
@naveennamani2
@naveennamani2 Год назад
PySimpleGUI
@tmahad5447
@tmahad5447 Год назад
lol snail
@Whatthetrash
@Whatthetrash Год назад
Very cool!
@ameliabuns4058
@ameliabuns4058 Год назад
by the looks of how fast python is improving python 4.0 is gonna be 10x faster than C (JK obviously)
@Lol52UK
@Lol52UK Год назад
Appreciate the timestamps
@AlexandreSenpai
@AlexandreSenpai Год назад
PYTHON WITH GENERIC TYPING OMFG 🫡🫡🫡🫡🫡🫡🫡🫡🫡🫡🫡🫡🫡🫡🫡
Далее