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!
patreon.carberra.xyz
join.carberra.xyz
If you need help with anything, feel free to join the Discord server:
discord.carberra.xyz
I get a lot of people asking, so here's my Visual Studio Code setup!
• My Visual Studio Code ...
-
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
Негізгі бет Python actually DOES have private attributes (sort of)
Пікірлер: 4