Python actually DOES have private attributes (sort of)

Published: 02 January 2024
on channel: Carberra
1,756
97

This definitely has to be one of the weirder parts of Python.

0:00 - Intro
0:50 - What are these "private attributes" (and methods)?
4:02 - Throw people off a little more by overloading _dir_
6:10 - Are they statically type-safe?
6:38 - Preventing name collisions
8:19 - How you should define "private" attributes
8:30 - Using properties as getters and setters
9:49 - Outro



If you enjoy my content, consider supporting me on Patreon or becoming a member!
https://patreon.carberra.xyz
https://join.carberra.xyz

If you need help with anything, feel free to join the Discord server:
https://discord.carberra.xyz

I get a lot of people asking, so here's my Visual Studio Code setup!
   • My Visual Studio Code setup!  



If you have any questions, don't hesitate to ask in the comments! I'll try and answer as soon as I can, providing someone else hasn't already done so.

#python #coding #howto


On this page of the site you can watch the video online Python actually DOES have private attributes (sort of) with a duration of hours minute second in good quality, which was uploaded by the user Carberra 02 January 2024, share the link with friends and acquaintances, this video has already been watched 1,756 times on youtube and it was liked by 97 viewers. Enjoy your viewing!