First Class Enums in Python

Category: Python - Education

This script allows you to do true immutable symbolic enumeration with qualified value access. Most propoqualifiedor an enum in python attempt to solve the issue with a single class. However, fact is that enum has a dual nature: It declares a new anonimous type *and* all possible instances (values) of that type at the same time. In other words, there is a distinction between an enum type and its associated values. Date: 17 May, 2012


Qualified Value Access - Symbolic Enumeration - Immutable Enumeration - Immutable - Symbolic - Enumeration

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 already provides immutable versions of many of the mutable built-in types.

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


make a class instance to immutable one.

developer Developer: KATO Kanryu
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


Useful class and decorator for create immutable objects.

developer Developer: Dmitry
license License: Freeware
operating systems Operating System: Windows


"Useless" alteration of immutable string object in 100% pure python.

developer Developer: Pepe Aracil
license License: Freeware
operating systems Operating System: Windows


Calling freeze() on an object makes the object immutable, like const in C++.

developer Developer: Andreas Nilsson
license License: Freeware
operating systems Operating System: Windows


Using eval() To Transform Symbolic Expressions script allows you to convert simple arithmetic expressions from infix to to converorm.

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


The win32api module offers SetFileAttributes whiles allows you to make changes to a file in windows.

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


This script demonstrates the discreet simulation of Round Robin Sheduling.

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