Friday, October 14, 2011

[Level 2] How to implement Enum in Python

#!/bin/env python
class CreateRemove:
    Create = 1
    Remove = 2

class AllowDeny:
    Allow = 1
    Deny = 2

print CreateRemove.Create
print AllowDeny.Deny
Wish this helps.
regards,
Stanley Huang