4 ms·
What is a double underscore? hello__world?
by spookthesunset 4y ago
What is a double underscore?
hello__world?
- jayknight 4y agoYep, or "dunder" as it's often called in the python world.
- eddsh1994 4y ago__special_functions__ __privateish_variable Etc, in the land of Python
- goodoldneon 4y agoI wish Python enforced private attributes. I once worked in a codebase where this was roughly true: _usually_private_but_ok_to_access_if_you_are_knowledgeable __private_unless_you_need_an_escape_hatch ___absolutely_private_except_for_a_few_times
- brookst 4y agoI mean doesn’t it make you want to make ___________super_ultra_private, with an accessor that corrupts the filesystem and hangs if you so much as look at it?
- goodoldneon 4y agoThat sounds good, but we might need a class attribute that disables filesystem corruption in case we need to access `___________super_ultra_private` somewhere