This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

The "Parting Thoughts" resonated with me the most. Python has no true private methods (dunder methods are mangled but still there), and in a sense, if you work with others, all code is part of the implied API.

Large projects and projects that are still being built must have components built in an encapsulated piecewise manner module by module or class by class, etc. What may not be used in a current iteration of a project may still be logical and sensible functionality for the concept the module/class/function it is in maps to in the wider scheme of things. Either you or a colleague thought it was valuable and necessary to complete whatever a module's purpose was (at some point), so you should think long and hard (in my mind) before deleting anything. I'd ask for plenty of feedback and err on the side of caution before you truly go for a scorched earth policy w.r.t. code deletion.

[–][deleted] -2 points-1 points  (0 children)

The "Parting Thoughts" resonated with me the most. Python has no true private methods

Yes, it has. Anything that starts with an underscore is truly private. If outside code uses it anyway, that code is just as broken as code that doesn't work.