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

init() now directly stores a copy of locals(). #163

Merged
merged 1 commit into from
Oct 12, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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