Skip to content

Instantly share code, notes, and snippets.

@camsom
Created September 19, 2014 19:35
Show Gist options
  • Save camsom/7001d943a64e657e52be to your computer and use it in GitHub Desktop.
Save camsom/7001d943a64e657e52be to your computer and use it in GitHub Desktop.
def __init__(self, *args, **kwargs):
for k, v in kwargs:
setattr(self, k, v)
def __init__(self, *args, **kwargs):
self.first_name = kwargs.pop('first_name', None)
self.last_name = kwargs.pop('last_name', None)
self.email = kwargs.pop('email', None)
def __init__(self, first_name=None, last_name=None, email=None):
self.first_name = first_name
self.last_name = last_name
self.email = email
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment