Cleanup BaseModel key iteration

This commit is contained in:
Jon Tibble 2010-05-29 21:57:56 +01:00
parent bbcfd7729c
commit c109b26d22
1 changed files with 1 additions and 2 deletions

View File

@ -34,8 +34,7 @@ class BaseModel(object):
Creates an instance of a class and populates it, returning the instance Creates an instance of a class and populates it, returning the instance
""" """
me = cls() me = cls()
keys = kwargs.keys() for key in kwargs:
for key in keys:
me.__setattr__(key, kwargs[key]) me.__setattr__(key, kwargs[key])
return me return me