On Wednesday, June 17, 2015 at 3:21:32 PM UTC-4, Jason P. wrote: > Hello Python community. > > I come from a classic background in what refers to OOP. Mostly Java and PHP > (> 5.3). I'm used to abstract classes, interfaces, access modifiers and so on. > > Don't get me wrong. I know that despite the differences Python is fully > object oriented. My point is, do you know any book or resource that explains > in deep the pythonic way of doing OOP? > > For example, I'm gonna try to develop a modest application from ground up > using TDD. If it had been done in Java for instance, I would made extensive > use of interfaces to define the boundaries of my system. How would I do > something like that in Python? > > > Many thanks!
What other languages do with interfaces, Python does with duck-typing. You can build something like interfaces in Python, but many people don't bother. I don't know if your project will be web-based, but here is an entire book about developing Python web sites with a TDD approach: http://www.obeythetestinggoat.com/ (Don't mind the unusual domain name, it's a bit of an inside joke...) TDD and interfaces are separate concepts, and I'm not sure they even intersect. TDD is about writing tests as a way to design the best system, and putting testing at the center of your development workflow. It works great with Python even without interfaces. --Ned. -- https://mail.python.org/mailman/listinfo/python-list