diff --git a/thriftpy/_compat.py b/thriftpy/_compat.py index 81eafcf..cb5a011 100644 --- a/thriftpy/_compat.py +++ b/thriftpy/_compat.py @@ -81,9 +81,8 @@ def __init__(self): varnames = ('self', ) + varnames def init(self): - kwargs = locals() - kwargs.pop('self') - self.__dict__.update(kwargs) + self.__dict__ = locals().copy() + del self.__dict__['self'] code = init.__code__ if PY3: