Magic Methods & Dunder - Advanced Python Tutorial #1

Magic Methods & Dunder - Advanced Python Tutorial #1

NeuralNine

3 года назад

272,857 Просмотров

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


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

@jagdishbelapure7521
@jagdishbelapure7521 - 27.11.2023 14:29

thank you for making nice content! appreciate your work!

Ответить
@youtubegoogle4163
@youtubegoogle4163 - 22.11.2023 12:38

I was just here to listen 👂 to those soothing and accurate key strokes

Ответить
@Rickety3263
@Rickety3263 - 15.11.2023 08:06

Look at me! I use neovim! … on… ::squints:: windows 10

Ответить
@salarghaffarian9745
@salarghaffarian9745 - 14.11.2023 19:37

Thanks for this great content!

Ответить
@deusexxi8426
@deusexxi8426 - 24.10.2023 22:31

Nice!

Ответить
@AdrianThoenig110
@AdrianThoenig110 - 16.10.2023 14:05

Amazing explanation!! Thank you

Ответить
@CreateCG1
@CreateCG1 - 29.09.2023 16:46

Who feels proud to finally come to learning advance python from the beginner version?

👇

Ответить
@JackGmustdie
@JackGmustdie - 17.09.2023 03:04

Thanks

Ответить
@SergiuMunteanu
@SergiuMunteanu - 23.08.2023 17:37

Great video.The Vector class example is not a vector, is a point in a 2D space:)

Ответить
@AMSahebdad
@AMSahebdad - 18.08.2023 23:01

thank you for your nice video
your video have good quality and people can learn thing form those .

Ответить
@Th3Younesse
@Th3Younesse - 12.08.2023 01:34

thanks man

Ответить
@MohammedBabelly
@MohammedBabelly - 03.08.2023 16:08

Thanks dude, that's exactly what I need

Ответить
@collinchau5582
@collinchau5582 - 08.07.2023 19:38

started from the beginner series to here thank you for making these videos!

Ответить
@AndrewMerts
@AndrewMerts - 07.07.2023 10:06

There's two mistakes worth mentioning here. When discussing _len__() you suggested that the correct way to do it for your Vector example would be Math.sqrt() to get the magnitude of the vector. __len_ is not just any arbitrary "length" it's supposed to be used to identify the items in a collection. It needs to return an int, not a float and you shouldn't be implementing dunder methods for some alternative use, it needs to keep the intended meaning. The other mistake was in _repr__(). There's __repr_ and _str_ and the reason why there's two of them for a very similar thing is because _repr_ isn't just some arbitrary string, it's supposed to be valid Python. As an example, the following should be true for a class where the _repr_ and _eq_ methods are properly implemented: "obj == eval(repr(obj))"

It's more or less serializing the object. You could have _str_ implemented exactly as you demonstrated, if _str_ is missing then converting to a string will fall back to using __repr__.

Ответить
@asdf12345929
@asdf12345929 - 25.06.2023 05:22

That is really cool! Great video thank you! Can't wait to try these in my coding. Looking forward to watching the rest of the video series

Ответить
@bun_bun17
@bun_bun17 - 17.05.2023 00:30

in java, i don;t need to do obj.toString(), once defined, i can simply print it out as well

Ответить
@rezahajivand7498
@rezahajivand7498 - 04.05.2023 00:40

Greeting from Iran
Reza hajivand

Ответить
@nadew.02
@nadew.02 - 03.05.2023 12:51

Thank you so much. I will have an exam that covers this soon and this helped me understand very well.

Ответить
@chillydoog
@chillydoog - 24.04.2023 17:46

Dropped a like just for using Nvim. Automatically more trustworthy.

Ответить
@Boufonamong
@Boufonamong - 22.04.2023 22:35

You look the spit of a dude my son used to watch play Fortnite

Ответить
@proudlycanadian3023
@proudlycanadian3023 - 26.03.2023 21:47

Thank you very much for the perfect lesson! Despite being very hard, I successfully persistent and have mastered perfectly!

Ответить
@BijouBakson
@BijouBakson - 18.03.2023 13:37

Thank you.

Ответить
@hayden9017
@hayden9017 - 02.02.2023 18:01

Can you tell me what IDE you use

Ответить
@markm4642
@markm4642 - 29.01.2023 03:16

Loving the series. Keep it up

Ответить
@shoryatyagi957
@shoryatyagi957 - 10.01.2023 11:26

which background music did you use?

Ответить
@Radical9535
@Radical9535 - 09.01.2023 20:01

i tried to learn python a bunch of times wish i started with the advanced stuff because beyond basic print input and out put stuff the rest just seems like static until this video!

Ответить
@arbitervildred8999
@arbitervildred8999 - 01.01.2023 07:18

well i like VS Code because it allows me to change zoom level, including the UI itself not just the text, then you can customize highlight and any other colors, you can also multi tab splitting the editor in multiple pages instead of running multiple IDE's and split them on screen, you can also do a lot of stuff with shortcuts, move between open files with CTRL+TAB, go to console and back to code with CTRL+ ` , open /close file explorer CTRL+B, it has support for basically any type of file extension (and if it doesn't it will popup the option to install a plugin for it)
have multiple terminals, and customize so much more with extensions
the best thing about it is that you can debug and have the code and the console in the same window

Ответить
@girish6064
@girish6064 - 27.12.2022 11:17

Thanks for sharing!

Ответить
@pawegorka3842
@pawegorka3842 - 23.11.2022 14:53

_repr_ method is for programmers, so should be return "Vector(60,80)".

Ответить
@johnsonsubedi1193
@johnsonsubedi1193 - 20.11.2022 05:16

Intro beat hitting harder than my dad's belt. T_T

Ответить
@EmileAI
@EmileAI - 15.11.2022 22:43

I don't think this is advanced python, more like intermediate level. _repr_ in particular
But great video nonetheless

Ответить
@ViralKiller
@ViralKiller - 05.11.2022 09:14

So _call_ only works in the bash console? I couldn't get it to show anything in IDLE

Ответить
@shuaibalghazali3405
@shuaibalghazali3405 - 03.11.2022 01:43

Thanks for the lesson

Ответить
@miguelvasquez9849
@miguelvasquez9849 - 20.10.2022 02:44

Nice video

Ответить
@s.m.shreyas918
@s.m.shreyas918 - 15.10.2022 17:30

can i get a video on how to make any custom class object completely immutable, i would love that indeed.

Ответить
@YoussefJIM
@YoussefJIM - 12.10.2022 15:36

great, as Java developer we need to learn quickly python to be operational

Ответить
@shubhamdeshmukh2890
@shubhamdeshmukh2890 - 06.09.2022 05:20

If don't know but I think this letters are too small

Ответить
@sahilsagwekar
@sahilsagwekar - 28.08.2022 17:37

buffed Tech with tim

Ответить
@fartzy
@fartzy - 31.07.2022 09:41

Love the python video!

Ответить
@mehdimojaradi
@mehdimojaradi - 23.07.2022 18:32

Very thanks for all your efforts and informative courses. I am learning a lot from your great contents.

Ответить
@julietatallaferro2072
@julietatallaferro2072 - 14.06.2022 19:19

nice :D

Ответить
@ivankomakech3912
@ivankomakech3912 - 24.05.2022 09:00

the content is very informational. what IDE and theme are you using?.

Ответить
@shb5498
@shb5498 - 10.05.2022 15:18

You made my day! That was the best simplest way to train these Dunders

Ответить
@DrAshishBamania
@DrAshishBamania - 21.04.2022 21:31

Subscribed! Thanks!

Ответить
@amraboughazala5986
@amraboughazala5986 - 15.04.2022 02:14

I loved it not only liked it

Ответить
@gbagba81
@gbagba81 - 24.03.2022 02:15

from last series you evolved from software engineer to navy technician xdxd

Ответить
@davidkoleckar4337
@davidkoleckar4337 - 25.02.2022 03:02

Shit, this was so advanced

Ответить
@ricardorodriguez4180
@ricardorodriguez4180 - 25.08.2021 01:07

You have a link for you vim dotfiles? Clean looking setup

Ответить
@mrm3875
@mrm3875 - 22.08.2021 14:45

What is your ide
It is vim new vim?

Ответить