def __init(self,affiliation,role,jid=None,nick=None,actor=None,reason=None):
if not affiliation:<EOL><INDENT>affiliation=None<EOL><DEDENT>elif affiliation not in affiliations:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>self.affiliation=affiliation<EOL>if not role:<EOL><INDENT>role=None<EOL><DEDENT>elif role not in roles:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>self.role=role<EOL>if jid:<EOL><INDENT>self.jid=JID(jid)<EOL><DEDENT>else:<EOL><INDENT>self.jid=None<EOL><DEDENT>if actor:<EOL><INDENT>self.actor=JID(actor)<EOL><DEDENT>else:<EOL><INDENT>self.actor=None<EOL><DEDENT>self.nick=nick<EOL>self.reason=reason<EOL>
Initialize a `MucItem` object from a set of attributes.

        :Parameters:
            - `affiliation`: affiliation of the user.
            - `role`: role of the user.
            - `jid`: JID of the user.
            - `nick`: nickname of the user.
            - `actor`: actor modyfying the user data.
            - `reason`: reason of change of the user data.
        :Types:
            - `affiliation`: `str`
            - `role`: `str`
            - `jid`: `JID`
            - `nick`: `unicode`
            - `actor`: `JID`
            - `reason`: `unicode`