3 ms·
While we're on Python and private methods - what's with everyone just _underscoring every method and variable by default? Does anyone teach people to do this or
by jstx1 4y ago
While we're on Python and private methods - what's with everyone just _underscoring every method and variable by default? Does anyone teach people to do this or have I just ran into a few people with this habit by chance?
I know what _underscoring does in Python and what PEP8 recommends but doing it all the time for everything is so ugly and unnecessary.
- ajoseps 4y agoI think it's because of what underscoring does. It's the "fake" privacy in Python. Also autocompleters tend to ignore those functions
- swinglock 4y agoPerhaps you worked with Java/C++ programmers using Python.
- frenchy 4y agoProbably for the same reason that zero-based versioning (https://0ver.org/ https://0ver.org/) is so popular. People want to avoid commitment.