Skip to content

Opening book details…

About this document

Simplifying Delegate Pattern in Python by sem is a document available to read on EtoBox.

The document describes a Python decorator that simplifies implementing the delegate pattern. It does this by automatically delegating unimplemented methods and attributes of a delegate class to a decorated class. The decorator works by first collecting the attributes of the delegate class. It then defines a "delegate" property on the decorated class to hold the delegate instance. For each unimplemented attribute, it adds a DelegatedAttribute descriptor that delegates getter, setter, and deleter calls to t

Author
sem
Language
EN