Simplified attribute accessors using ove

Category: Python - Education

This script presents an ideom for simplified accessors, that combines typical getter and setter functionality of an attribute into a single overloaded method, that instead of getATTRIBUTE and setATTRIBUTE can now just be called ATTRIBUTE. When called without arguments it acts as a getter and retrieves the attribute's value. When called with arguments, the attribute is set to this value. Date: 24 January, 2012


Attribute Accessors - Overload Method - Attribute Value - Attribute - Accessors - Value

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

This script presents an ideom for simplified accessors, that combines typical getter and setter functionality of an attribute into a single overloaded method, that instead of getATTRIBUTE and setATTRIBUTE can now just be called ATTRIBUTE.

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 contains a few simple descriptor classes to compute and cache attribute value on demand and to define attribute as alias to other.

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


This script defines a dictionary with attribute-style access.

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


Python has no inherent provision for a restrictive API that blocks accesses to methods and variables outside an allowed set.

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


This script presents a way to introduce proper attribute access protection levels using a generic proxy object.

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


Whenever a superclass implements a __init__ method to initialize its attributes, subclasses derived from it have to invoke the __init__ method of the superclass.

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


This script uses the 'Multicast' class to multiplex messages/attribute requests to objects which share the same interface.

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


Sometimes it is useful to know what attributes are available to you for an object in active directory.

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


The ObjectMerger class dynamically merges two given objects, making one a subclass of the other.

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