[Bf-committers] Decorator Pattern
toni at playsign.net
Mon Mar 12 12:31:16 CET 2018
Python decorators do not implement the Decorator Pattern, they are
different things. Wikipedia explains it like this:
Please do not confuse the Decorator Pattern (or an implementation of
this design pattern in Python - as the above example) with Python
Decorators, a Python language feature. They are different things.
Second to the Python Wiki:
The Decorator Pattern is a pattern described in the Design Patterns
Book. It is a way of apparently modifying an object's behavior, by
enclosing it inside a decorating object with a similar interface. This
is not to be confused with Python Decorators, which is a language
feature for dynamically modifying a function or class."""
I'm not surprised if that pattern, nor other from the OO patterns
movement, is not used in Blender at all. Curious to hear if it is,
On Mon, Mar 12, 2018 at 7:25 AM, Campbell Barton <ideasman42 at gmail.com> wrote:
> Hi, Blender's built in scripts don't make much use of decorators
> they are used here though:
> On Mon, Mar 12, 2018 at 11:33 AM, Brad Eric hollister
> <behollis at soe.ucsc.edu> wrote:
>> I’m preparing a short talk on the decorator pattern for classroom instruction.
>> I’d like to use an example from Blender. Are there any such examples in the codebase?
>> Bf-committers mailing list
>> Bf-committers at blender.org
> - Campbell
> Bf-committers mailing list
> Bf-committers at blender.org
More information about the Bf-committers