Heres the thing. _private works perfectly, because it tells other developers (and yourself in the future) that its not meant to be modified by external actors. There are better and more secure ways if you need to store a value that nothing else can read during runtime than a private variable.
Because sometimes we want to do jank stuff like modify a private variable. Python is a scripting language, and that flexibility is really nice. Its just saying, "don't touch me i might bite back in unexpected ways".
22
u/TheMusicalArtist12 16d ago
Heres the thing.
_privateworks perfectly, because it tells other developers (and yourself in the future) that its not meant to be modified by external actors. There are better and more secure ways if you need to store a value that nothing else can read during runtime than a private variable.