DEV Community

Discussion on: Protocols and Composition in Python

Collapse
 
meadsteve profile image
Steve B

Nice post 👍 I think you've got a small mistake on your first "class LoggingAddService". It doesn't use the inner for doing the add.

Collapse
 
fwojciec profile image
Filip Wojciechowski

Yes, of course - thanks for spotting it! Fixed.

Collapse
 
meadsteve profile image
Steve B

Glad I could help. I enjoyed reading this post. This kind of thing is the reason I created: github.com/meadsteve/lagom. Although I've not settled on a pattern for dealing automatically with decorators like in your example.

Thread Thread
 
fwojciec profile image
Filip Wojciechowski

Thanks! lagom looks cool -- I'll check it out! And what a great name for a project!