Public and protected attribute access

Category: Python - Education

This script presents a way to introduce proper attribute access protection levels using a generic proxy object. By default all attributes are "protected" in the C sense and can be declared as public using either a function decorator or a class attribute. Date: 22 April, 2012


Attribute Access - Public Access - Protected Access - Attribute - Public - Access

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 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


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 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 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


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: Freeware
operating systems Operating System: All


This helps prevent duplicate content on the blog.

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


This script allows you to transpose a list of lists of different lengths.

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


This script scans a freshly checked out CVS project for binary files that have not been checked-in correctly and, as a result, may be corrupt.

developer Developer: johnnypops.demon.co.uk
license License: Freeware
operating systems Operating System: All