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
@@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.
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
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!
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!
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#
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.
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.
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.
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
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
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.
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.
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
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?
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.
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.)
**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!
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?
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
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 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 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! :)