'When sreg options are not specified, defaults are used.'

def __init__(self, id, name, op_endpoint_url, sreg_required=None, sreg_optional=None, use_for=None, store_user_preference=None, never_associate_with_user=None):

    self.id = id
    self.name = name
    self.op_endpoint_url = op_endpoint_url
    if (sreg_optional is None):
        self.sreg_optional = ['nickname', 'email']
    else:
        self.sreg_optional = sreg_optional
    if sreg_required:
        self.sreg_required = sreg_required
    else:
        self.sreg_required = []
    if (use_for is not None):
        self.use_for = use_for
    else:
        self.use_for = {}
        if ('nickname' in (self.sreg_optional + self.sreg_required)):
            self.use_for['username'] = 'nickname'
        if ('email' in (self.sreg_optional + self.sreg_required)):
            self.use_for['email'] = 'email'
    if store_user_preference:
        self.store_user_preference = store_user_preference
    else:
        self.store_user_preference = {}
    if never_associate_with_user:
        self.never_associate_with_user = True
    else:
        self.never_associate_with_user = False
