[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

Comments

Popular posts from this blog

[Level 1] Rar tool for Solaris.

[Level 2] iif in Python