Personal tools
You are here: Home Documentation Links Using Grok to walk like a duck

Using Grok to walk like a duck

This Link applies to: Any version.

Talk given at PyCon 2008 by Brandon C. Rhodes, "Grok provides tools for general-purpose application design. Reuse in Python often involves teaching an old class new tricks: adding attributes or methods to allow the class to function in a new environment that its author had not anticipated. A simple coding example is enough to illustrate that the three traditional Python approaches to this problem are burdened by significant limitations. The talk will examine the concept of an "adapter", an industrial-strength design pattern which solves every problem burdening the other three approaches — but which makes it necessary to call the adapter constantly from your code! The talk therefore concludes by introducing Grok, whose ability to register and dynamically invoke your adapters will remove all mention of them from your code while leaving you in full control of how classes are adapted. "

Link: http://youtube.com/watch?v=UF77e2TeeQo