Automatic delegation-an alternative to i

Category: Python - Education

Python classes cannot inherit from any type, just from other classes. However, automatic delegation (via __getattr__ and __setattr__) can provide pretty much the same functionality as inheritance (without such limits, and with finer-grained control). Date: 15 February, 2012


Alternative To Inheritance - Automatic Delegation - Object Oriented Programming - Inheritance - Delegation - Object

Homepage: http://code.activestate.com/

Developer: code.activestate.com

License: Freeware

Operating System: All

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

Python classes cannot inherit from any type, just from other classes.

developer Developer: code.activestate.com
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


This script is useful when you want a class instance to act as if it was an instance of another class (at least from some aspect), but for some reason you can't use multiple inheritance.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


JIT is a class for Just In Time instantiation of objects.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


This tutorial covers how to get most out of the Object Oriented Programming Conecpts using C++ Language.

developer Developer: mycplus.com
license License: Freeware
operating systems Operating System: All


Sunframework is based on PHP5 (OOP,MVC) and is designed to be fast and simple.

developer Developer: SourceForge.net
license License: Freeware
operating systems Operating System: All


This handler manages a chain of registered callback functions.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


Proxies can be useful at times but may not be simple to create and run.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


This script defines the whoaminow() function that can be used inside a function to determine, at the time it is called, the name under which that function has been invoked.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


This script is a pure Pythonic implementation of a set class.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All