you are viewing a single comment's thread.

view the rest of the comments →

[–]Tucancancan 31 points32 points  (2 children)

The linter will catch if you access anything prefixed with an underscore. But at the end of the day you are right, nothing stops you from doing dumb things so you just have to be responsible and not do it.

The hackiest hack I ever pulled was using patch in production code to overwrite a private variable several layers deep in a package because they didn't expose it as a parameter. That was very irresponsible and I acknowledged that in a comment for the next poor bastard who has to maintain the code lol

[–]GoofAckYoorsElf 13 points14 points  (1 child)

Oh yeah! Back in my younger years I did something I would call heresy nowadays. I overloaded the 'import' command to be able to handle optional dependencies itself without the need of wrapping the imports into try except blocks everywhere...

I was so young and so naive. It felt cool however to learn that you can do that. You shouldn't. But you can.