Skip to content

Comment on Testing Without Interfacesparent

Comments

I agree with this 100%. It's embodied in the "we're all consenting adults" philosophy of python: http://en.wikipedia.org/wiki/Python_syntax_and_semantics#Obj...

Marking variables as private using naming conventions like foo._dont_mess_with_me is also often helpful. Tools like linters can warn you that you're doing the wrong thing (messing with object internals) but the language doesn't get in your way or force you to use things like reflection to do what you want.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.