Python tricks: Using magic (dunder) functions to create list-like objects

  Рет қаралды 17,010

Sebastiaan Mathôt

Sebastiaan Mathôt

Күн бұрын

Пікірлер: 36
@theawesomegamer123
@theawesomegamer123 4 жыл бұрын
1:30 "Whenever we take a look at a member from the ASAP mob, that member goes solo, because as soon as a member gets a little bit of attention, he goes solo" I laughed so hard when he said this 😂😂
@micahbeckman4442
@micahbeckman4442 4 жыл бұрын
I've seen a lot of python tutorials - yours are the best.
4 жыл бұрын
You probably say that to all the Python KZbinrs ;-)
@micahbeckman4442
@micahbeckman4442 4 жыл бұрын
What other Python KZbinrs? :)
@jsonhub4082
@jsonhub4082 5 жыл бұрын
thx for such infos , good work, BTW this is the third video YT that i've seen about dunder and it's the BEST ONE.
@debvdo
@debvdo 7 жыл бұрын
Good video. I liked how you return a generator object from a call to __iter__(), using yield. It works as an iterator.
@pilaramonkgogimoshebashebi2371
@pilaramonkgogimoshebashebi2371 6 жыл бұрын
8:00 "If A$AP Sebbie, thats me. Thats my A$AP mob name..." 😂...............😂 That deserves a double like. Good Tutorial.
@ibekwevictor1158
@ibekwevictor1158 2 жыл бұрын
Thanks for the Tutorial ... I appreciate your work .... Bringing hip hop vibes in python 👍💪
@yt-1161
@yt-1161 2 жыл бұрын
@11:10 when you write return member in self._members Which function does the python use to check whether the member is "in" the list?
@BigOlKnothead
@BigOlKnothead 2 ай бұрын
The pure depth of actually insightful and useful and unrepetitive conprehensively exhaustive full wealth of the correct information makes you the best code writing creator by huge margins. So many others give the most vagueried minimum of information that often leave the viewer at the end with more questions than the video provided s
@SebastianSanchez65
@SebastianSanchez65 4 жыл бұрын
great video in dunders!
@min2MAXdances
@min2MAXdances 4 жыл бұрын
this was a very helpful straightforward tutorial!
@andyd568
@andyd568 5 жыл бұрын
Sebastiaan is the OG of programming. Great vids.
@UniBreakfast
@UniBreakfast 7 жыл бұрын
No __next__? Also this __iter__ gives members in reverse order. Is it supposed to do that?
7 жыл бұрын
+Михаил Нинин The __next__() function is only necessary when you implement iteration through a separate iterator class, rather than through a generator function as done here (in which case yield serves the same purpose). But you're right about the order: it would've been more elegant to do a pop (0)!
@marcelangulo510
@marcelangulo510 4 жыл бұрын
Excelente video
@sheikhakbar2067
@sheikhakbar2067 4 жыл бұрын
Beautiful!
@experimentalhypothesis1137
@experimentalhypothesis1137 4 жыл бұрын
interesting video
@dontbetoxic4387
@dontbetoxic4387 3 жыл бұрын
How are ur sunglasses called?? Pls answer
3 жыл бұрын
My sunglasses prefer to remain anonymous ;-)
@dontbetoxic4387
@dontbetoxic4387 3 жыл бұрын
@ :(
@surajchopade6735
@surajchopade6735 6 жыл бұрын
Thanks for such amazing video
@abhayagarwal5097
@abhayagarwal5097 5 жыл бұрын
Great work man,thks
@ramstein74
@ramstein74 7 жыл бұрын
Great vid Can you suggest a python book ?
7 жыл бұрын
Thanks! I generally recommend the Python track on CodeAcademy for beginners (www.codecademy.com/learn/learn-python). Or, if you prefer a book format, A Byte of Python (python.swaroopch.com/). For more advanced Pythonistas, I think watching KZbin tutorials about specific issues is a good way to learn as well.
@mainsequence1055
@mainsequence1055 5 жыл бұрын
"Automate the Boring Stuff in Python" is also a great book.
@SS-pz8md
@SS-pz8md 3 жыл бұрын
@ thanks
@TechieGuy82
@TechieGuy82 3 жыл бұрын
Sublime!
@veziop
@veziop 3 жыл бұрын
goes solo, hilarious
@blenderremastered9959
@blenderremastered9959 4 жыл бұрын
programmer elevated to gagster still Sebastiaan Mathôt.
@dillip4572
@dillip4572 4 жыл бұрын
You rock :)
@arryhere
@arryhere Жыл бұрын
single _ is protected , double __ is private
@PaulaJBean
@PaulaJBean 6 жыл бұрын
een ___getitem___ die als side-effect het muteren van de datastructuur heeft? Daar gaan je gebruikers van opkijken. Je schendt daarmee het *principle of least astonishment* , en.wikipedia.org/wiki/Principle_of_least_astonishment
6 жыл бұрын
+Paula J. Bean Dat is een goed punt.
@jamil4322
@jamil4322 5 жыл бұрын
but the x was false sir
Python tricks: properties, staticmethods, and classmethods
12:39
Sebastiaan Mathôt
Рет қаралды 44 М.
Python tricks: All there is to know about Exceptions
18:12
Sebastiaan Mathôt
Рет қаралды 18 М.
КОГДА К БАТЕ ПРИШЕЛ ДРУГ😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 7 МЛН
Triple kill😹
00:18
GG Animation
Рет қаралды 18 МЛН
I Turned My Mom into Anxiety Mode! 😆💥 #prank #familyfun #funny
00:32
2 MAGIC SECRETS @denismagicshow @roman_magic
00:32
MasomkaMagic
Рет қаралды 33 МЛН
Python MAGIC METHODS are easy! 🌟
13:36
Bro Code
Рет қаралды 8 М.
Python Generators Explained
28:37
Tech With Tim
Рет қаралды 158 М.
A simple explanation of super() in Python
15:02
Sebastiaan Mathôt
Рет қаралды 48 М.
Python dataclasses will save you HOURS, also featuring attrs
8:50
Python tricks: Writing user-friendly code with PEP-8 naming conventions
15:30
Python Classes and Objects - OOP for Beginners
8:01
Python Simplified
Рет қаралды 564 М.
Improving Python performance with multiprocessing | Python tricks
15:29
Sebastiaan Mathôt
Рет қаралды 9 М.
КОГДА К БАТЕ ПРИШЕЛ ДРУГ😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 7 МЛН