What are __slots__ in Python? Optimize Your Code!

  Рет қаралды 10,087

NeuralNine

NeuralNine

4 ай бұрын

In this video, we learn about slots in Python and how we can use them to optimize our code.
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
🐍 The Python Bible Book: www.neuralnine.com/books/
💻 The Algorithm Bible Book: www.neuralnine.com/books/
👕 Programming Merch: www.neuralnine.com/shop
💼 Services 💼
💻 Freelancing & Tutoring: www.neuralnine.com/services
🌐 Social Media & Contact 🌐
📱 Website: www.neuralnine.com/
📷 Instagram: / neuralnine
🐦 Twitter: / neuralnine
🤵 LinkedIn: / neuralnine
📁 GitHub: github.com/NeuralNine
🎙 Discord: / discord

Пікірлер: 13
@TheRetroEngine
@TheRetroEngine 4 ай бұрын
You, sir, are a mean-machine of knowledge and perseverance. Appreciated. Been watching for quite a few years now.
@gxost_off
@gxost_off 4 ай бұрын
Quite underrated channel tbh. So much useful things to learn.
@pythoneatssquirrel
@pythoneatssquirrel 4 ай бұрын
if you will get a runtime error with if __name__ == '__main__': freeze_support() ... The "freeze_support()" line can be omitted if the program is not going to be frozen to produce an executable. the solution is to add under if __name__ == '__main__': everything that is after the for loop (including it)
@andiglazkov4915
@andiglazkov4915 4 ай бұрын
Thanks ☺️
@PatrickSteil
@PatrickSteil 4 ай бұрын
Great video. Do we know why the memory usage is lower?
@jedpittman6739
@jedpittman6739 2 ай бұрын
same question here
@WabuhWabuh
@WabuhWabuh 4 ай бұрын
bro you need to explain the function...whats the point of the video if your just giving variables...you could have just made a twitter post about it...-.- it would have been way more effective than this...
@thomasgoodwin2648
@thomasgoodwin2648 4 ай бұрын
How does this affect subclassing? 🖖😎👍
@wtywrty7486
@wtywrty7486 4 ай бұрын
i wonder where did you learned or found this functionality ? any website or reference?
@pingzhong-pl5sb
@pingzhong-pl5sb 4 ай бұрын
i had seen it from fluent python
@oguzhantopaloglu9442
@oguzhantopaloglu9442 4 ай бұрын
Its 2024, nobody cares about saving memory :P
@OlegSenn
@OlegSenn 4 ай бұрын
Were you on the Cyberpunk dev team?
@Maegtur
@Maegtur 3 ай бұрын
i program in micropython with micro-controllers. and i care a lot about memory ;)
Garbage Collection in Python: Speed Up Your Code
16:41
NeuralNine
Рет қаралды 13 М.
5 Good Python Habits
17:35
Indently
Рет қаралды 338 М.
КАХА и Джин 2
00:36
К-Media
Рет қаралды 4 МЛН
Indian sharing by Secret Vlog #shorts
00:13
Secret Vlog
Рет қаралды 52 МЛН
Omega Boy Past 3 #funny #viral #comedy
00:22
CRAZY GREAPA
Рет қаралды 31 МЛН
Bro be careful where you drop the ball  #learnfromkhaby  #comedy
00:19
Khaby. Lame
Рет қаралды 42 МЛН
Optimize Your Python Programs: Code Profiling with cProfile
15:10
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 788 М.
Modern Python logging
21:32
mCoding
Рет қаралды 147 М.
PLEASE Use These 5 Python Decorators
20:12
Tech With Tim
Рет қаралды 89 М.
What the Heck Are Monads?!
21:08
ArjanCodes
Рет қаралды 67 М.
8 things in Python you didn't realize are descriptors
14:21
Every Python dev falls for this (name mangling)
14:11
mCoding
Рет қаралды 135 М.
5 Useful Python Decorators (ft. Carberra)
14:34
Indently
Рет қаралды 83 М.
5 Useful F-String Tricks In Python
10:02
Indently
Рет қаралды 246 М.
Debugging 101: Replace print() with icecream ic()
12:36
NeuralNine
Рет қаралды 354 М.
Индуктивность и дроссель.
1:00
Hi Dev! – Электроника
Рет қаралды 1,5 МЛН
Теперь это его телефон
0:21
Хорошие Новости
Рет қаралды 1,7 МЛН
ПК с Авито за 3000р
0:58
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,4 МЛН
iphone fold ? #spongebob #spongebobsquarepants
0:15
Si pamer 😏
Рет қаралды 161 М.
Apple, как вас уделал Тюменский бренд CaseGuru? Конец удивил #caseguru #кейсгуру #наушники
0:54
CaseGuru / Наушники / Пылесосы / Смарт-часы /
Рет қаралды 4,5 МЛН