Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

Commit

Permalink
Merge pull request #163 from jparise/init-dict
Browse files Browse the repository at this point in the history
init() now directly stores a copy of locals().
  • Loading branch information
lxyu committed Oct 12, 2015
2 parents 8cc573d + ae4d2e2 commit ddeeb36
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions thriftpy/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ddeeb36

Please sign in to comment.