freebsd-ports/devel/py-AddOns/pkg-descr
Martin Wilke b531208a60 py-AddOn classes are like dynamic mixins, but with their own private attribute
and method namespaces. A concern implemented using add-ons can be added at
runtime to any object that either has a writable __dict__ attribute, or is
weak-referenceable.

AddOn classes are also like adapters, but rather than creating a new instance
each time you ask for one, an existing instance is returned if possible. In
this way, add-ons can keep track of ongoing state. For example, a Persistence
add-on might keep track of whether its subject has been saved to disk.

WWW:	http://www.python.org/pypi/AddOns

PR:		ports/135947
Submitted by:	Wen Heping <wenheping at gmail.com>
2009-07-01 09:02:52 +00:00

11 lines
593 B
Text

py-AddOn classes are like dynamic mixins, but with their own private attribute
and method namespaces. A concern implemented using add-ons can be added at
runtime to any object that either has a writable __dict__ attribute, or is
weak-referenceable.
AddOn classes are also like adapters, but rather than creating a new instance
each time you ask for one, an existing instance is returned if possible. In
this way, add-ons can keep track of ongoing state. For example, a Persistence
add-on might keep track of whether its subject has been saved to disk.
WWW: http://www.python.org/pypi/AddOns