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
"""
me = cls()
keys = kwargs.keys()
for key in keys:
for key in kwargs:
me.__setattr__(key, kwargs[key])
return me