Components and Abilities (different implementation of Component architecture)

Category: Python - Miscellaneous

I define a 'Component' as an attribute (typing optional) that instances can assign objects to. Nothing special there, but their usefulness comes in with 'Abilities'. If a class inherits from 'ClassWithAbilities', it will be given a special attribute 'abilities' that will grow/shrink when other classes with abilities are assigned to an instances attributes. It increases/decreases the functionality of the instance depending on what objects are assigned to it. All of these abilities are accessed through the 'abilities' attribute. This is a redesign of Recipe 576852, but I believe is different enough to warrant a new recipe. Date: 16 April, 2012


Abc - Ability - Abstract Base Class - Component - Descriptor - Dynamic - Interface - Plugin

Homepage: http://code.activestate.com/recipes/576854-components-and-abilities-different-implementation-/?in=lang-python

Developer: Danny G

License: Freeware

Operating System: Windows

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

This is an extension to the abc.

developer Developer: Eric Snow
license License: Freeware
operating systems Operating System: Windows


Abstract Bases Classes in Python provide great features for describing interfaces programmatically.

developer Developer: Eric Snow
license License: Freeware
operating systems Operating System: Windows


If you need


to define named tuple subclasses (including reusable abstract ones), adding/overriding some methods, in a convenient way;
to have the named tuple ABC (abstract base class) for isinstance/issubclass tests;
or simply would like to define your named tuple classes in a class-syntax-based and DRY way (without repeating type names.

developer Developer: Jan Kaliszewski
license License: Freeware
operating systems Operating System: Windows


Allows for type hierarchies of immutable types by faking inheritance using dict updates and abc's.

developer Developer: Aaron Sterling
license License: Freeware
operating systems Operating System: Windows


My desire was to design a class with defined attributes that when assigned on instances, would expand the instance's functionality.

developer Developer: Danny G
license License: Freeware
operating systems Operating System: Windows


The builtin set and frozenset types are based on object equality; they call __eq__ to determine whether an object is a member of the set or not.

developer Developer: Gabriel Genellina
license License: Freeware
operating systems Operating System: Windows


ASP Mail Component is ActiveX component designed to allow e-mail sending from Active Server Pages (ASP).

developer Developer: SoftComplex.com
license License: Freeware
operating systems Operating System: Windows


this is a python program Python Program for Windows domain based machines to collect usefull information , this can be very customizable to the type of information you'd want to collect.

developer Developer: mgarrana Garrana
license License: Freeware
operating systems Operating System: Windows


Modified from Recipe 576842 to support linux

Walks through the all the Firefox profiles in current user account and cleans all *.

developer Developer: Vince Spicer
license License: Freeware
operating systems Operating System: Windows