#NEWLINE# def add_role( self , role , parents = [ ] ) : #NEWLINE# #INDENT# 'Add a role or append parents roles to a special role.\n\n        All added roles should be hashable.\n        (http://docs.python.org/glossary.html#term-hashable)\n        ' #NEWLINE# self . _roles . setdefault ( role , set ( ) ) #NEWLINE# self . _roles [ role ] . update ( parents ) #NEWLINE# for p in parents : #NEWLINE# #INDENT# self . _children . setdefault ( p , set ( ) ) #NEWLINE# self . _children [ p ] . add ( role ) #NEWLINE# #UNINDENT# if ( ( not self ) or self . _roles_are_deny_only ( parents ) ) : #NEWLINE# #INDENT# self . _denial_only_roles . add ( role )