libpyrrent/libpyrr/utils.py

14 lines
323 B
Python
Raw Permalink Normal View History

2016-03-10 16:05:17 +03:00
class Struct(dict):
2016-03-09 16:49:48 +03:00
def __getattr__(self, attr):
return self[attr]
def __setattr__(self, attr, value):
self[attr] = value
class Enum(dict):
def __getattr__(self, attr):
return self[attr]
def __setattr__(self, attr, value):
pass
def __setitem__(self, k, v):
pass